If you are using an isp router it is assigning a dns server to devices via DHCP. If you go into the router, you’ll likely be able to modify DHCP settings. I would set the DNS server to be either cloudflare (1.1.1.1) or google (8.8.8.8).
If you want to test that this will fix the issue, you could manually set one of your devices to use 1.1.1.1 for DNS and see if it resolves the issue.
If your router doesn’t allow you to modify these settings, you could turn DHCP off on the ISP device and then have another device on your network act as the DHCP server. Many consumer routers/WAPs have optional DHCP servers that can be enabled.