Bring 4 quarts of water to a rolling boil over high heat, 8–10 minutes; add the kosher salt and keep at a boil.
Finely grate the pecorino romano to a fluffy, powdery texture and set aside, 2–3 minutes.
Toast the black peppercorns in a wide skillet over medium heat until fragrant, 1–2 minutes; ladle in 3/4 cup of the boiling water and simmer to make a peppery broth, 1 minute.
Cook the spaghetti in the boiling water until just shy of al dente, 1–2 minutes less than package time (usually 7–9 minutes); reserve 1 1/2 cups pasta water, then transfer the pasta to the skillet with the pepper broth.
Toss over medium heat until the liquid reduces to a shallow, silky pool in the pan, 1–2 minutes, adding splashes of reserved water as needed.
Remove the skillet from heat; sprinkle in the grated cheese in 3 additions, tossing vigorously and adding small splashes of reserved water as needed until the sauce is glossy and creamy and clings to the pasta without clumping, 1–3 minutes. Serve immediately.