Pour the milk into the inner pot, and cover with a lid that fits on top of the Instant Pot.
Select the YOGURT function and adjust until the digital display reads BOIL.
When the cooking time has been completed, remove the lid, careful not to let any condensation drip into the pot.
Remove the inner pot and place it on a trivet.
Next, stir in the lemon juice or citric acid, and continue to softly stir until the milk starts to coagulate. This will take about 30-40 seconds. Stop stirring and let the mixture stand for 5 minutes.
After that, line a fine-mesh sieve over a large bowl and carefully pour the mixture onto the sieve.
For moist, creamy ricotta, let the cheese drain for 5 minutes. For firmer ricotta, allow the cheese to drain for about 4 hours at room temperature.
When the cheese is done draining, stir in the salt to taste.
Transfer the cheese to an airtight container and refrigerate.
Use in recipes or serve as a spread with some olive oil, pepper, and dried herbs.