Either the contacts on the USB-C port(s) are damaged (liquid damage seems common at least on the laptops I support for my organization), or the USB chips on that side of the Logic Board are bad. You will need to have Apple or an Apple Authorized Service Provider examine the laptop to provide you with a repair estimate.
FYI, this particular model does have a higher rate of failure with its Logic Board, so I would question if it is even worth repairing this laptop. I have seen several people recently mention they had Logic Boards replaced for this exact model....even the replacement Logic Board showed issues immediately after they got their laptops back from repair....after a second repair, they still had issues and Apple was refusing to replace it again. I know one of those users had a legitimate complaint since they had no third party software causing the problem. If it only needs an I/O Board, then probably worth it. Just keep in mind the battery may be starting to wear, so that is another potential cost you may need to consider. If the Logic Board is bad, then I would recommend putting the repair money towards another laptop.