Bring a large pot of lightly salted water to a rolling boil. Cook spaghetti until al dente, about 12 minutes, stirring occasionally. Reserve 1 cup pasta water, then drain.
Meanwhile, heat the olive oil over medium heat in a large skillet. Add minced garlic and black pepper, sauté for 1–2 minutes until fragrant but not browned.
Add ⅓ cup reserved pasta water to the skillet, stirring to create a peppery broth.
Transfer drained spaghetti to the skillet. Toss vigorously off heat, gradually adding grated cheeses and remaining pasta water as needed to form a smooth, creamy sauce that coats the noodles.
Season with salt and extra black pepper to taste. Serve immediately, garnished with a sprinkle of Pecorino and cracked pepper.