Heat the olive oil in a small saucepan. Add the garlic and onion and cook until softened, 5-7 minutes. Add the crushed tomatoes and sugar and bring to a simmer. Stir in the basil and remove from the heat. Season with salt and pepper.
Meanwhile, bring a large pot of salted water to a boil. Add the spaghetti and cook according to package instructions. Drain the pasta, return to the pot, and drizzle with olive oil.
To serve, place the cooked ravioli in a serving dish. Top with sauce, Parmigiano-Reggiano, and basil for garnish.