How to Connect LoRa and WiFi by arduino(feat. pushbutton)

Hello Everyone!
I'd like to make a test code which can be connected by LoRa(TTGO) and also connect to WiFi...!!

What i'd like to make exactly is, if i press the pushbutton, then I can connect to LoRa and if i press the pushbutton again, then it will connect to WiFi..

Can i get some advice or some sample code that i can refer to...??

Sounds like a good project to get started with. What have you done so far. Do you have a schematic, not frizzy pictures. There is a lot of sample code available online some good some not so good. You need to do some research and show us what you have accomplished. I do not know your skill set or resources, you might want to let us know what parts you are using and post links to the technical side of those parts.