iTunes not recognising iPhone
So I've connected the phone to my MacBook on macOS Mojave with an official Apple 30-pin to USB wire, and it charges, but iTunes isn't recognising it. I've tried the same on my macOS Sonoma iMac, but Finder won't recognise it either, and the iPhone still charges when connected, so the wire works. I also use the wire for regular charging, so the wire is perfectly fine. I don't know what to do. I've been following millions of guides online, but they don't work. What to do? The iPhone is disabled and is telling me to connect to iTunes, so I don't have an option. Please help! The iPhone is on iOS 9.3.6.
iPhone 4s, iOS 9