You cannot cancel 2 factor authentication. And you don’t need SMS to receive the 6 digit 2FA codes. By default, those codes are sent as iCloud encrypted notifications, not SMS. So as long as you have a trusted device with you, and internet access (WiFi or cellular data) you will get codes when needed.
If you are still using the much older 2 step verification system, which does use SMS for its 4 digit codes, then you’d be better off switching it to 2 factor authentication instead.
Two-factor authentication for Apple ID - Apple Support
2 step verification is the older system -> Two-step verification for Apple ID - Apple Support