Here's a very simple Node-RED flow for a MQTT test using a FREE broker.
This should test if your setup is working.
If you click the 'Inject' node you should see this message arrive in the 'Debug' node.
As a starting point, import the Node-RED flow below and make sure it works for you.
[{"id":"447794de5aa4fb6c","type":"tab","label":"Quick MQTT test","disabled":false,"info":"","env":[]},{"id":"219d4b3ff09c4bbf","type":"mqtt in","z":"447794de5aa4fb6c","name":"","topic":"myquicktest","qos":"2","datatype":"auto-detect","broker":"190876ba43bba92a","nl":false,"rap":true,"rh":0,"inputs":0,"x":190,"y":160,"wires":[["e5746f22a5f06a14"]]},{"id":"0ec31304e605cff4","type":"mqtt out","z":"447794de5aa4fb6c","name":"","topic":"myquicktest","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"190876ba43bba92a","x":390,"y":100,"wires":[]},{"id":"a01f3b5a0d9755f4","type":"inject","z":"447794de5aa4fb6c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello World","payloadType":"str","x":190,"y":100,"wires":[["0ec31304e605cff4"]]},{"id":"e5746f22a5f06a14","type":"debug","z":"447794de5aa4fb6c","name":"MQTT_In_debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":160,"wires":[]},{"id":"366114aeee0a573f","type":"comment","z":"447794de5aa4fb6c","name":"A quick test using a mosquitto.org FREE remote broker","info":"","x":300,"y":40,"wires":[]},{"id":"190876ba43bba92a","type":"mqtt-broker","name":"","broker":"test.mosquitto.org","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]