If the PDF shows in the message on your iPhone but not on the Mac, the encryption itself usually isn’t what makes the attachment disappear.
I’d open the same message directly at mail.yahoo.com in Safari on the Mac. If the attachment or download link appears there, the issue is with the mail app or how the message is being displayed on the Mac.
If it’s missing in Yahoo webmail too, try another browser and make sure you’re viewing the exact same message/thread. Some secure PDF services use a web link instead of a normal attachment, and those links can behave differently on mobile and desktop.
If you can post what you see on the Mac where the attachment should be, or the exact message you get when you click it, that would help narrow it down.