For example on my LG V30, I can go to the dialer and enter :
*#*#4636#*#*
I can then go into "Phone info" and set the radio to "LTE only" or "LTE/WCDMA", and if there is no 2G/3G/etc... I will not be have any service. [1]This also works for most android phones, with small exceptions.
[1] : https://ibb.co/JvZVHXF