virus just from having an email in the deleted folder

i had an email sitting in the deleted folder and suddenly for no reason a virus was activated, i didn't integrate with the email at all didn't even open it as far as i remember, am i safe or should i format it was moved to quarantine, it makes no sense for it to even happen as i was using the outlook app it should not activate viruses even if an email is opened

Filen C:\Users\zzcoo\AppData\Local\Packages\microsoft.windowscommunicationsapps_8wekyb3d8bbwe\LocalState\Files\S0\3\Attachments\Invoice_410_1672684662292 [4409].shtml är smittad med Trojan.HTML.Phishing.BUG och flyttades till karantä

Filen C:\Users\zzcoo\AppData\Local\Packages\microsoft.windowscommunicationsapps_8wekyb3d8bbwe\LocalState\Files\S0\3\Attachments\January invoices paid [4384].shtml är smittad med Trojan.******.GenericKDZ.11675 och flyttades till karantä