The auto-update process of Windows security software used to have a nasty habit of getting stuck in a loop, meaning that computers got slowed to a crawl. (It wasn't a rare occurrence. I experienced it myself across many computers over the years).
Therefore I used to recommend that people ditch it as soon as possible. (If you go back far enough in my AB posts, you'll find that I originally recommended AVG but I then found similar problems with that software too. So Avast then became my preferred choice).
However Microsoft seem to have
finally sorted out the problem. (It only took them a couple of decades!). So I'm now happy to stick with Windows Defender.
With regard to uninstalling Avast . . .
The program can sometimes be uninstalled in the same way that most software can be but, because anti-virus programs are made deliberately difficult to uninstall, the uninstall process might fail. If so, there's a special tool available from Avast to get around the problem. See here:
https://support.avast.com/en-gb/article/10/?option=av#pc
Once Avast has been fully uninstalled, the Windows anti-virus software should automatically kick back in again. To check that it has though, type 'security' into the search box and click on 'Windows Security'. Click the shield icon in the left-hand panel and scroll down to 'Virus and threat protection settings' to check that 'No action needed' is shown.
If that message isn't there, or if you simply want to double-check that everything is running as it should, click on 'Manage settings' to eventually reach a point where 'Real-time protection' is enabled.