Might want to discuss this with Apple Support, or make an appointment at the local Apple Store. They may have suggestions here.
I’m not sure why you’re getting lots of codes.
Verification codes for an Apple ID are requested at major actions, such as adding or removing or signing into a new Apple device, or (occasionally) signing into a just-upgraded device, or for certain sign-ins into Apple.com websites.
Locally, that means a couple of codes per month, unless I’m specifically adding or removing an Apple device, signing into certain Apple.com websites, or something else requires a new code. Most of which you won’t be doing.
One alternative to the six digit verification codes are security keys, but there are reasons why you might not want to purchase and configure and use those.