In addition to the above, on iPhones you can completely disable the physical SIM in the settings by flipping a toggle, the same as disabling an eSIM. That'll prevent you from receiving calls and SMS in addition to switching off data.
The toggle (and the individual SIM menu that contains it) only shows up if you have multiple SIMs installed.