Laptop WiFi connection issues

My Lenovo Ideapad slim 3 will connect to the WiFi when I turn it on. But within a couple minutes anything that requires an internet connection will stop working even though I am still connected to the internet(with no issues according to troubleshooter).

At first this issue was only when starting up the computer, but now it will alternate between working and not working continuously.

I’ve tried -weird command prompts - reinstalling the drivers -reinstalling windows updates

I’m suspicious that this could be a hardware issue. Has anyone else had this issue? How can I fix this?