I had issues unable to connect web3. Tinkering around and finally solved the problem.
I am using google chrome. (Should work on brave browser too)
First check your metamask extension version. Settings> about (Latest ver 10.1.0 from chrome webstore. But my extension was 10.0.3 )
Second right click your metamask extension> manage extension> switch on developer mode on the top right.
Lastly press update which is on the top left and confirm with your extension Settings> About (Make sure its the latest version)
Hope this helps, if yes leave a like so those who are suffering can see it too.