Warm olive oil in a large skillet over medium heat.
Sauté onion with a pinch of salt until translucent, about 4–5 minutes.
Stir in garlic, oregano, and red pepper flakes; cook 30 seconds until fragrant.
Add tomato paste and cook, stirring, until darkened slightly, about 1 minute.
Pour in crushed tomatoes, sugar, remaining salt, and black pepper. Simmer 10–12 minutes.
Bring a large pot of salted water to a boil while the sauce simmers.
Boil gnocchi until they float, 2–3 minutes; reserve some cooking water and drain.
Toss gnocchi into the sauce with a splash of pasta water to coat and loosen.
Stir in butter and basil; taste and adjust seasoning.
Serve hot, showered with Parmesan and extra basil if you like.