Have you tried using a different charger or charger cable and checked if the phone now started to charge, you didn’t say?
Use a strong light and a magnifying glass to visually inspect the phone’s charge port to ensure that there is no lint etc lodged in the port enclosure that may prevent a good electrical connection which is maybe why the battery is not charging properly and therefore the phone won’t turn on. Also check that all the pins in the charge port are not damaged etc.
If there is any debris in the port enclosure, do not use a metal pin or probe to try and get it out as you may damage the pins or cause electrical problems in the phone. Instead try to clear it out by using a vacuum cleaner.
If the charge port appears to be OK then perhaps there may be a problem with the battery. Try replacing the battery and check if that resolves the problem.
Here’s a teardown video of your model phone that may help. It shows how to open the phone so that access to the battery is possible. The battery is be seen being disconnected at about 4:00 minutes into the video. Unfortunately the video doesn’t actually show the battery being removed but you should be able to work out how it is done.
Replacement batteries are available online. Just search for HTC U12+ battery to get results for suppliers that suit you.
If replacing the battery yourself seems too daunting, contact a reputable, professional mobile phone repair service and ask for a quote.