Fill a pot with milk. Stir in salt, if using. Heat over medium heat until milk registers 185°F (85°C) on an instant-read thermometer.
Add vinegar or lemon juice and stir briefly to incorporate. Curds should begin forming almost immediately; stop stirring as soon as they've formed throughout the pot.
Without stirring, continue to hold curdled-milk mixture at 185°F for 20 minutes. It's okay if the temperature fluctuates down to 175°F (79°C) or up to 190°F (88°C), but try to keep it in that zone for the full 20 minutes.
Line a fine-mesh strainer with paper towels or cheesecloth. Using a slotted spoon, transfer curds to strainer and let stand until excess liquid has drained away.
Drained ricotta can be refrigerated, covered, for up to 2 days, though it is best when freshly made.
