Hello Saeid,
There is no Lightning connection on either of your MacBooks. Your new M1 MacBook Air and your MacBook Pro do not have the lightning port. What you have on your new M1 MacBook Air are two Thunderbolt (USB-C) ports and I am not sure which port(s) you have on your MacBook Pro because I do not know which year it was released. It is definitely not the lightning port.
Let's assume that you have connected both MacBooks by using the proper and correct cable. Do you see the Wi-Fi symbol and does it state a Peer to Peer connection? If YES then it is using the hard cable connection. If not then it is using the Wi-Fi connection that you already suspect.
The correct process to use is to turn on your MacBook Pro and open Migration Assistant on it first. Turn ON your M1 MacBook Air and open Migration Assistant on it. Connect both MacBooks with the appropriate cable. Then execute the migration.
Axel F.