Recover from possible infection by virus attachment via email I clicked on an attachment of a scam email by mistake and the file was downloaded to the download folder. I did not open it, but I feel that this was probably enough to infect my laptop.  The format was filename.z. the content was about an invoice that I was actually waiting for. So I quickly clicked on it without much thought. Then I read the mail which was spam.

I am using MacBook Pro 2017 running 10.14.6. I have never installed any anti-virus or anti-malware software.

Are there any recommended steps I should take? I deleted the file from the download file and permanently from trash. But other than that I do not know what the best course of action is.
GENERALLY speaking just downloading a file or saving it to your hard drive will not infect your Mac. Generally.

What you have done after inadvertently saving the file is trashing it and then emptying the trash, which is exactly what you should have done. While it is possible that whatever you downloaded infected your Mac, I would say the odds are pretty low.

There are a number of free or inexpensive malware scanners available for macOS. Malwarebytes and AVG spring to mind, but there are others and perhaps others that do a better job. Wander over to macworld.com (or just search on AV software for Mac) and see what they say about Mac AV software. Then download and use the one that looks good to you.