Do you remember whether you locked it in Preview or another app? If the PDF will not open at all, Preview cannot remove the protection without the password. I would check Keychain Access, saved notes, and Time Machine backups, then download another copy from your tax portal or ask your accountant. I had to recover an old return from a backup when my old laptop died, and that was much easier than guessing passwords.