When something cannot connect, I first want to know if the port answers at all. nc can check that in a second and without a client.
nc -zv example.com 443
nc -zv -w 3 192.168.1.10 22
-z only checks that a connection can be made and sends no data, -v prints the result, and -w 3 gives up after three seconds. It prints succeeded or refused, or just times out when a firewall drops the packets.
Caveat: there are several versions of netcat and they differ in details. The flags above work in the OpenBSD version, which is the one on macOS and on Debian and Ubuntu. Checking UDP ports with -u gives unreliable answers.
Further reading: nc(1)