Fill a large saucepan with water, season generously with salt, and bring to a rolling boil. Add the spaghetti and cook until al dente following the package instructions. Before draining, scoop out ½ cup of the pasta cooking water and set it aside. Drain the pasta thoroughly.
Meanwhile, in a wide skillet set over medium-high heat, add the ground beef and diced onion. Cook, stirring occasionally, until the beef is browned and the onions are softened—approximately 5 minutes.
Incorporate the taco seasoning, canned tomatoes with their juices, and the reserved half-cup of pasta water into the skillet. Stir to combine, then bring the mixture to a gentle simmer and let it cook for 5 minutes.
Add the drained spaghetti to the skillet, followed by the shredded cheddar cheese. Stir until the cheese is fully melted and coats the noodles and beef evenly.
Serve immediately, garnished with freshly chopped cilantro. Optional toppings include extra shredded cheese, diced fresh tomatoes, or a dollop of sour cream.