How to Get the IP Gateway via CLI in 4G/5G Networks?

Does anyone know how I can get the IP Gateway using a command-line interface (CLI) in both 4G and 5G network contexts?