I'm having the same issue. I can connect to Wi-Fi but then after a few minutes I'm losing the Internet connection. Restarting Wi-Fi helps but only for a couple of minutes and then the Internet is down again. All other devices connected to the same network are fine. Tried all solutions I could find:
restart,
network connection settings (new location, manual setting, removing files, DNS, renew DHCP lease, auto proxy detection),
reset NVRAM and SMC,
safe boot,
removing all VPN apps,
disabling startup items.
Nothing worked.
macOS Big Sur version 11.6.1,
MacBook Pro (Retina, 13-inch, Mid 2014),
2.6 GHz Dual-Core Intel Core i5,
16 GB 1600 MHz DDR3