Wifi is extremely hard to find issues. Very tiny difference in the position of antenna can make a huge difference. It is a much larger problem on desktop machines where the antenna are located very close to the back of a large metal box.
With a laptop the antenna are generally on the back of the screen and turning the laptop may change the signal levels.
There is not a lot you can do about antenna placement on a laptop.
The other different might be if the phone is using a different data encoding. If for example both your router and your pc are using one of the really dense wifi6 data encoding but the phone only supports a older simpler one. When you run a very fast data encoding it may run faster but it also takes more errors which cause these ping spikes. For most application small latency changes do not impact and higher speed is preferred. Games use almost no bandwidth, well under 1mbps in most cases. Unlike pretty much any other application they want extremely consistent latency which means a simpler data encoding that takes less errors is better for games.
Maybe you can force your card to run simpler encodings, it depends on the options. Most this is set on the router. If you have the option try to force it to only use 20mhz radio channels. You can also try 2.4 and 5. 2.4 generally has better coverage but is slower which you don't care about as much.
In the end playing games on wifi is always going to be gamble. Best would be to find some way to not use wifi. Consider MoCA or powerline networks if you can not use ethernet.