If you have just started experimenting then I think it's easier to use an online broker.
I use the following brokers to experiment with MQTT on Codesys Windows Runtime which can run on PC with any need for actual PLC.
www.cloudmqtt.com
or
https://www.hivemq.com/public-mqtt-broker/
Does Siemens offer a MQTT library for S7-1200?
I tired MQTT last year with S7-1200 and could not make it work. Going by the memory of a man who doesn't like remembering I think it had something to do with authentication. I was able to connect to a local broker but I could not connect to an online one. I believe S7-1200 does not support secure communication and having to open a port that was blocked by my ISP. Can't seem to find my notes.
Edit: I just realized secure communication was available also with 4.3 which is the version I was working with. I will have to dig in more to find out what issues I had; I'm quite sure it had to do with connecting to remote server.