Check the network connection:
Check the status of your network on Mac -> Check the status of your network on Mac - Apple Support
If your Mac isn't connecting to the internet over Wi-Fi
If your Mac isn't connecting to the internet over Wi-Fi - Apple Support
If they are On, turn Off Hotspot & VPN.
Charge the battery > 70%.
If you can't connect to the App Store, iTunes Store, or other Apple services
If you can't connect to the App Store, iTunes Store, or other Apple services - Apple Support
-> If you tried all of the above steps and you still can’t connect, contact Apple Support.
Check the router settings -> Recommended settings for Wi-Fi routers and access points
Recommended settings for Wi-Fi routers and access points - Apple Support