Hi manutd1972,
Welcome to the forums.
Really sorry this happened to you. Point of having an antivirus running is to protect you when the threat happens, and as you found out, avast tried to do so.
Real-time protection trumps manual scanning every time as when the malware gets in running a manual scan will not completely remove a threat once it gets in. Too many things get hidden and too many variables are at play.
So, the best thing to do is to follow instructions here, and attach the logs requested: https://forum.avast.com/index.php?topic=194892.0
Please read Pondus’ reply and consider whether you need the services of a certified malware expert.