That’s what airplane mode is. Try it out in the control center. It doesn't disable my WiFi unless I had WiFi disabled when I last turned airplane mode off. Similar with Bluetooth except turning airplane off turns my Bluetooth on even if I had it off before.
Of course, an OS update or a reboot might reset the value of the previous WiFi state. 🤷♂️
Could be either depending on the order you watch them, but I’m really getting the giggles thinking about Rogue One ending with a record scratch and “I bet you are wondering how I got here!”