How to put your iPhone on offline?

Like your SIM is still in your iPhone and it's still switched on but no one can contact you or you can contact anyone. Kinda like you have a SIM in your iPhone that's switched off.

Look through settings

You put on do not disturb mode and you can do that. Where no one will contact you.

Airplane Mode [on] off

Turn on flight mode this will tell callers that you are offline.