They'll usually let you bring you own hardware. As long as you buy one that is not carrier locked it will work (if you're buying it in a store, ask the staff to be sure it's unlocked)
If your old SIM card doesn't fit you might have to ask your carrier to send a new one, or you can ask for eSIM setup (log into your carrier account, scan a Qr code)
The phone pulls carrier specific settings based on SIM card carrier data. Apple allows the carrier to set a hotspot block