Problem - 'DNS address could not be found'
From the description of your problem you encounter a generic DNS misbehaviour.

If your Mac and your iPhone are within the same network, the origin of your problem is at your network router level. Either of thrre causes may lead to this no DNS servers:
 - the DNS servers of your ISP have changed and your router configuration
   wasn't upgraded,
 - the DNS servers of your ISOP aren't reachable,
 - your router was hacked and a bad DNS server IP address was provided to
   route all your traffic toward booby trapped web servers.

To analyse further this problem, just check what is the IP address configured at your router level. You might include its complete configuration within your original question, so as to get further help.

If you see that your router configuration was changed without
your knowledge, change its default password ASAP, and
restore its correct configuration.