Some OEM like Samsung provide a way to use 2G/3G only mode from their settings menu. But most OEM don’t.
Here is a way to access the hidden menu in all Android devices regardless of OEM.
Open the default dialer and enter the following code.
From there select your preferred network.
For 2G select GSM only.
For 3G select WCDMA only.
For 4G/LTE select LTE only.