No. That will merely block outgoing connections. As your server is serving some content, it more or less has to allow either incoming or outgoing connections. Either can be used by attackers - albeit in different fashions.
If you block both incoming and outgoing connections, it will generally improve security monumentally, but it will have a somewhat measurable impact on usability as well.
Your question is showing a common misunderstanding. Security is not pushing a button. If it was, everyone would push that button. Security is a process to stay in front of attackers. Generally Defence in Depth is a good idea - have multiple barriers.
Blocking outgoing connections may lessen the impact, as it disallows an attacker to use the machine as a jump host - but it won't impede gaining access.
The same goes for sandboxing and using destroyable containers: gaining access is still possible, but you have reduced impact - at least if the isolation holds. It's not unheard of to escalate out of a container. There's of course mitigations you can do to reduce the attack surface, such as rootless dockers. But it's ultimately back to defence in depth: figure out attacks, implement mitigations, lather, rinse, repeat.