Clean and chop onion, garlic, and carrot.
Sauté the vegetables in oil in a pot.
Add port wine, red wine, and chopped fresh thyme, and reduce it by half.
Add beef stock and reduce again by half. Here you add the pan juices from the meat you are serving the sauce with - the pan juices can be replaced by broth water.
Season with salt and pepper, lemon juice, and gastrique. If you don’t have gastrique, it can be replaced by vinegar and sugar.
Remove the sauce from the heat and whisk in the butter cubes one at a time just before serving. The advantage of using unsalted butter is that you don’t further salt the sauce when whisking in the butter cubes before serving. If you use salted butter, be aware that the sauce should be able to take a bit more salt when you taste it.

After this, you can choose to strain the sauce before serving to make it completely smooth. It's a matter of preference.