Apparently the default passcode on all Nokia phones is 12345.
If that doesn’t work, I think you’ll need to contact Nokia customer support. However, their site seems to suggest they can’t help with forgotten passcodes.
https://www.hmd.com/en_gb/support/nokia-3310-user-guide/keys-and-parts