Just a wild guess: are you using the 5ghz or 2.4ghz Wifi?
5ghz is way faster but very fidgety with larger distance to the router, walls in the way or other routers nearby.
So, maybe you can troubleshoot your way out:
play as close as possible to the router using 5ghz and see if problems persist
check if changing to 2ghz makes a difference
use a network analyser on your phone to check if others use the same band as you, which might disrupt your connection. If so, check your router settings to change band to another one
Just a wild guess: are you using the 5ghz or 2.4ghz Wifi? 5ghz is way faster but very fidgety with larger distance to the router, walls in the way or other routers nearby.
So, maybe you can troubleshoot your way out:
Good luck!