Apps losing internet connection frequently.
Recently there have been cases where I lose the internet connection (WiFi) on my laptop. All of the apps that I have on my MacBook Air (2018), whether downloaded from the internet or from the App Store abruptly stop working and show that there is no internet connection. I have checked my internet connection (WiFi) on other devices too but they all seem to be working very well. Also, all of the apps except for Safari loses the internet connection. This problem has been happening frequently nowadays. This gets corrected once I restart my laptop, but there doesn't seem to be any other solution for that. At first, I thought that this was a problem with my laptop, but my brother's laptop, (which is also a MacBook Air, 2017) loses its internet connection at the same time and all the apps on his laptop except for Safari stops getting the internet connection. I also have an iPad but that doesn't lose its connection when our laptops lose it.
Can somebody help me with this? This has been happening frequently and I am looking forward to a solution.
MacBook Air 13″, macOS 11.2