It sounds like the one USB-C port is damaged as your symptoms you have described are exactly what happens. Unfortunately the USB-C ports on the non-Touchbar MBPro 2017 model are integrated onto the Logic Board. The Logic Board is an expensive repair. You may get lucky and a tech may be able to clean the contacts on the bad USB-C port if that port has any corrosion or burn marks.
FYI, the USB-C ports pull double duty in supplying power to the laptop and also providing data transfers. These two features are separate. Either one can fail while allowing the other feature to continue working.
Personally I would not spend any money to fix this laptop as this laptop has a ton of design defects both known and not well known:
- Display cable defect
- Butterfly keyboard design flaws
- Battery issue with some non-touchbar models
- SSD failures with some non-touchbar models (the SSDs in this model have a higher rate of failure than any other model including the Touchbar 2017 model)
All of those issues listed above were ones which Apple provided free repair programs (now expired).
One of the unknown issues is that the USB-C ports on the 2016 - 2017 models wear down with repeated use since Apple uses small protrusions from the USB-C ports (I/O Board or Logic Board) to make the USB-C connections snap in tight. However, these protrusions are just made from the fiberboard used by circuit boards and it wears down quickly. At least the Touchbar models have separate less expensive I/O Boards for the USB-C ports instead of having the USB-C ports on the non-touchbar model being on the expensive Logic Board. At least Apple realized their mistake and added metal edging to the USB-C ports on the 2018+ models.
Besides, a 2017 laptop likely needs to have the battery replaced after five years. Apple just raised the battery prices today.