What you need is a reverse proxy like Nginx Proxy Manager.
Educate yourself what SNI is, what SAN are in a SSL certificate, and how a reverse proxy uses this.
All this is not specific to mailcow so google for it. It is common knowledge for operating web servers, and we won’t help you with the basics.
After that you can use mailcow to use the reverse proxy for mailcows http and https ports.
The certificate thing is tricky, I would recommend to get them on the reverse proxy and copy them to mailcow afterwards.
There is a steep learning curve in front of you, running and configuring a mail server is a complex thing with many protocols to understand.