Configure 2.4GHz wifi as a gateway with terminal

Hello!

I would like to create a configuration with the following properties:

  1. LAN ports: Ethernet ports and Wifi 5GHz
  2. LTE is the default gateway
  3. 2.4 GHz Wifi is the gateway if connected
  4. The LAN network is NAT-ed

So my question is how can I set the 2.4GHz wifi from the terminal to connect to an AP (under SSID with password) and operate as a gateway?

Mikrotik router: https://mikrotik.com/product/wap_ac_lte_kit
network.png