Just to clarify so I can guide you better, do you see the iPhone charging when connected, and does it appear in Device Manager at all, even with a warning icon?
Also, open Device Manager and look for “Apple Mobile Device USB Driver” under Universal Serial Bus controllers. If it’s missing or shows an error, that confirms a driver issue rather than a phone fault.