It depends what you want to do with your esp data, but it makes sense for your mqtt broker to be running 24/7.
Since my pc is only switched on when I'm looking at it, I run mosquitto, mysql and node-red on a raspberry pi with no screen or keyboard.
Data continues to be exchanged and logged, devices are managed etc while the pc is off.
And there is an mqtt broker which runs in Node-Red, Aedes. It has less capability than mosquitto but it's easier to install. I have not run it or node-red on a pc though.