Return the pasta to the pot. Add the grated cheese, butter, black pepper and roughly 1/4 cup of the reserved pasta water to the pot, stirring until combined. If necessary, add more pasta water to thin out the cheese and butter until the spaghetti is well coated.