Your home WiFi? A public WiFi? All WiFi connections? (Let's figure out where the problem is, first.)
The first thing to check is the signal strength where it happens. Even in a small house (I've had it happen in a 1200 sq. foot house) there can be dead spots. (And if you're near a running microwave, WiFi will die.)
Try turning off modem and router.
Also see that your router firmware is up to date.
Change channels.
Using 5G or 2.4?