Assuming these are both located on the same public IP, you need a reverse proxy to resolve each hostname independently and serve up the correct certificate.
Probably need to clarify, as the last poster and I have interpretted what you wrote differently.
Is it 2 different instances of HA on one public IP, or 1 instance and you want 2 different public hostnames?
Either way, you can just use a reverse proxy. If you are use the HA OS you can just download one of the proxy addons and follow the instructions. I dont (I only use venv, so I can’t offer much on the HA OS side) and just use Caddy to do it.