Some strategies involve forcing the Protoss to take an army fight he might not win, on huge maps like there are today you have to abuse liberators for defense and semi doom drops.
As for the fight against templars itself, if you have ghosts, you « just » have to be very careful with your army.
One trick would be not to bind all of your ghosts into a separate control group, so the ones you send can try to suicide emp the shit out of the Protoss army / templars.
Usually when you have liberators Protoss will blink, you have to focus stalkers with your bio if possible.
It’s a lot of tricks / tactics so the best way would be to watch vods of pro Terrans and see how they do.
It’s tough and can be frustrating but unless you are already high level, there are mistakes your opponent will make that you can easily abuse.