scanned my MacBook with avast and it says the file /private/car/db/dyld/Dyld_shared_cache_x86_64h is infected with MacOS:Pirtit-BU (Adw)
This is, of course, utter nonsense.
/private/var/db/dyld/Dyld_shared_cache_x86_64h is maintained by macOS. It exists to minimize the time it takes to boot your Mac, and should not be touched. It is kept updated normally by Software Update.
If on the other hand something is installed at /private/car/ then further investigation is needed. A folder by that name has no reason to exist.
Get rid of "Avast". Rule 1 of Macs is don't install junk.