Only open email attachments from trusted sources.
Although many email providers already put a lot of effort into scanning your attachments for viruses, this won't protect you from all risks. An email attachment can be disguised in many ways to look like a common file that you would trust, like a PDF document or a ZIP archive.
The best way to address this risk is by verifying the sender again, while keeping in mind that their email account could have been compromised. Check if this is the typical type of message that you get from this sender, and if it is out of the ordinary, reach out by phone to verify that they actually sent it. Do not use another digital channel to communicate with the sender, since there is a chance that you may then be dealing with an impostor. Phone calls, video calls, or meeting in person are the best ways to keep the risk low.
Finally, remember that the sender may not be aware of their devices being infected by malware, so once you do download the file; run a virus scan over that file to cover all possibilities of being affected by malware.