Bring a large pot of salted water to a rolling boil. Add spaghetti and cook until al dente according to package directions. Reserve 1 cup of pasta water before draining.
While pasta cooks, heat a large skillet over medium heat. Add chopped bacon and cook until crispy, about 6-8 minutes. Transfer bacon to a paper towel-lined plate, leaving about 2 tablespoons of fat in the skillet.
If using garlic, add it to the skillet and sauté for 30 seconds until fragrant. Remove skillet from heat.
In a mixing bowl, whisk together eggs, grated Parmesan cheese, and black pepper until well combined.
Add drained pasta to the skillet with bacon fat (and garlic if added). Toss to coat evenly.
With heat turned off, quickly pour egg mixture over pasta. Stir vigorously and constantly to create a creamy sauce. Add reserved pasta water, a little at a time, until sauce reaches desired silky consistency.
Stir crispy bacon pieces back into the pasta.
Serve immediately, garnished with additional Parmesan and black pepper if desired.