Hello RocxelB,
Apple Support Communities is a great place for help with your Apple ID, and we’re glad you were directed here from the Two-factor authentication for Apple ID article. It sounds as though you’re attempting to log in to your Apple ID on your new iPhone, but not receiving the verification code due to getting a new phone number. If so, you may be able to retrieve a verification code using the steps in the following article.
Get a verification code and sign in with two-factor authentication
If you’re unable to retrieve a verification code, the next step would be to request account recovery. You can find those steps outlined in the article below.
How to use account recovery when you can’t reset your Apple ID password
While the title of the article references not being able to reset your Apple ID password, these steps are the right course of action for regaining access to your Apple ID. Once you’ve been able to regain access to your Apple ID, you can update your trusted phone number to your new phone number.
Take care!