Your Wi-Fi issue is probably not the MacBook Air's fault.
Yes, the M2 and M3 Airs have occasional Wi-Fi quirks, but in 9 out of 10 cases the problem is your router or network setup, not the laptop.
Start with the obvious: restart your router and modem. Unplug