If you used a custom password, you can't.
iOS/iPadOS:
"[…]If you use a unique password for Notes, there is no way to access your locked notes if you forget the password. If you forget this password, you can reset your notes password and use your new password to lock other notes. If you access your iCloud notes on more than one Apple device, use the same notes password to lock and unlock all of them.[…]"
How to lock or unlock notes on your iPhone or iPad - Apple Support
macOS:
"[…]If you’re using a custom password to lock and unlock notes, and you’ve forgotten the password, you can reset it. If you reset the password, you’ll be able to lock any future notes using the new password, but notes that are already locked still have the old password that was in effect when you locked them.[…]"
Change your password for locked notes - Apple Support