The CPU by antimalware service executable has troubled a lot of guys and one of the simple solutions that I have found is to add it to the Windows Defender Exclusion list. Find out the path of the executable by opening to th efile location in the task manager and then update security. Now choose windows defender and add it to to the exclusion list and save changes. I hope that works out for you. https://appuals.com/how-to-fix-high-cpu-usage-by-antimalware-service-executable-msmpeng/