Start by washing the cranberries, and discard the ones that are mushy.
Reserve about 1/2 cup of cranberries and set it aside. This is optional and usually is done to add the cranberries at the end, to have a mix of different textures.
In a small bowl combine the warm, microwaved orange juice with 2 tablespoons of sugar, until sugar is fully dissolved.
Add the orange juice mixture to the Instant Pot.
Add the rest of the ingredients: cranberries (reserving about 1/2 cup if you want), orange zest, lemon zest and a pinch of salt. Stir to combine.
Cover with the lid, lock and make sure the knob is pointed to sealed.
Cook on High Pressure for 1 minute if using fresh cranberries and for 2 minutes if using frozen cranberries, followed by a 5-minute Natural Pressure Release.
Open the Instant Pot and select Sauté medium heat. Stir the mixture, and add the remaining sugar 1/2 cup at a time and remaining 1/2 cup of cranberries. Stir to combine until the sugar is dissolved. Stir and cook for about 3-5 minutes, for the sauce to thicken.
At this point if the sauce is too thin aka watery, you can add the remaining 1/2 cup of sugar, to make it thicker and sweeter.
If you want the sauce thinner, add more orange juice, 1/4 cup at a time, stir to combine and simmer for a few minutes.
Eventually, if you want to thicken the sauce without adding more sugar, see blog post on cornstarch slurry instructions.
Once the sauce is thick enough and as sweet as you like it, turn of the pot, stir in vanilla extract if using and add it to a serving bowl.
Fully cool the sauce before refrigerating it.