The Pi can easily run a website and an MQTT broker on your local network. If you want to view that website from outside, you'll need to open your firewall and deal with people trying to hack.
However, you could keep your website external and MQTT on the Pi and have some custom code on the Pi that acts as an MQTT client and forwards your sensor data to the external website. No need to open ports for this method.