I'd suspect that you have a problem with your home router. Connect to its administrative console and have a look at its logs.
There could also be a problem with your internet service provider.
You see, your home router is your actual "route" to the Internet. Any traffic that you want to send out over the Internet first goes to your home router which, through the magic of (mumble, mumble) actually sends the traffic out and returns the response back to you.
What your Mac is saying, then, is that it is able to detect that the router doesn't seem to be doing that consistently. Even though you remain connected to your WiFi network (which eliminates any problems with your Mac ...), traffic destined for the Internet isn't consistently being delivered for some "upstream" reason.
If you happen to be curious about how it all works, console commands like
traceroute can actually show you exactly how a packet "bounces" from one server to another to another within the Internet as it magically gets to where it needs to go ... sometimes taking a different path each time.