Do you have and use a VPN? If so unless you're using a true VPN tunnel, such as between you and your employer's, school's or bank's servers, they provide false security from a privacy standpoint. Read these articles: Pubic VPN's are anything but private and Security Risks: The Dangers of Using Free VPNs (eccu.edu).
Additionally a new study ("Apple Offers Apps With Ties to Chinese Military”) is specifically about VPN apps in Apple’s App Store.
If you have a VPN uninstall it according to the developers instructions and see if that will let you connect to the internet.
Otherwise try the following:
1 - shut down you Mac, router and modem.
2 - restart the devices in this order: modem, router and then the Macs.
