Soft Reset - Take out the battery for 10 seconds. Then put it back in and restart by holding down the power button down.
or
Start in safe mode
Check the port for lint or corrosion…blow into it and and clean it out.
After ruling out software issues I would move on to the physical issues. Luckily your phone has a separate charging/data board. The part is probably under 5 bucks and available to buy online. I had the same issue with an old nexus 3 phone. I replaced the board several times to keep it going. You could also reflow the connector but that is tricky.
If you are comfortable opening the phone I would order the part and keep syncing using your SD card. Also caveat: there’s always some risk to opening the phone of course.
Sounds good - there are probably some opening instructions online if you google. That was very helpful for my nexus 3 teardown as there were lot sof little cables attached with adhesive. i had to be careful not to tear them off the board when I opened it.