If the charger works, but data devices do not work, then there is a hardware issue with the laptop....most likely the Logic Board will need replaced. Power & data are two separate things on these USB-C Macs. One may work while the other won't work. Make sure to try connecting the devices directly to the Mac since some adapters, docks, & hubs may have compatibility issues with some devices.
macOS already has great built-in security, but you must also do your part to keep your Mac clean & safe. Those anti-virus apps, cleaning apps, and third party security software do nothing more than interfere with the normal operation of macOS which can cause all sorts of issues. Here is an article a well respected forum contributor has written which has some great tips for safe computing practices:
Effective defenses against malware and other threats - Apple Community