If you are in the USA your iPhone 15 won't take a SIM card, it will use an eSIM.
You can use the phone as your trusted device for 2FA, but I strongly urge you to set up more than one number as a way to get a code, just in case you have issues with the iPhone (such as it being stolen or lost). You can even use a landline or non-Apple phone.
This is based on the section "About trusted phone numbers and trusted devices" in the article: Two-factor authentication for Apple ID - Apple Support
To see, add, or change your trusted phone numbers use one of these methods:
● On your iPhone, iPad, or iPod touch: Go to Settings > your name > Password & Security. Next to Trusted Phone Number, tap Edit.
● On a Mac computer choose Apple menu > System Settings (or System Preferences), then click your name (or Apple ID). Click Password & Security, then add or remove a trusted phone number.
● Using a web browser:
1) Go to https://appleid.apple.com and sign in.
2) Follow security options until you find one letting you change trusted numbers,
3) Click "+" to add a new number (you may be required to verify this number).
4) If you wish to remove an old number, click "-" next to the number.
Similar information for the iPhone can be found here --> Use two-factor authentication for your Apple ID on iPhone - Apple Support
If you set up an Account Recovery Contact ( Set up an account recovery contact - Apple Support ) you can also get a code that way.
You should consider making sure you have multiple trusted devices and telephone numbers (ask a friend or a relative).
You may also wish to read the articles 'Two-factor authentication for Apple ID' ( Two-factor authentication for Apple ID - Apple Support ) and 'Get a verification code and sign in with two-factor authentication' ( Get a verification code and sign in with two-factor authentication - Apple Support ). Various sections contain information that is useful in understanding about the trusted devices (an iPhone, iPad, or Mac that Apple knows is yours) system, and how to get a verification code on a trusted device or at a telephone number.