Cannot connect to MQTT Broker

I’ve been working on the Node-RED via MQTT example provided by Simumatik. However, I’m facing an issue with connecting to the broker, with an error saying “Connection with cannot be established”. I tried using different ports, but the issue persists. I used MQTTBox to communicate with the Node-RED dashboard, and it seemed to work properly.
Any help would be greatly appreciated.