Heat the olive oil in a large skillet over medium heat.
Sauté the diced onion for 4-5 minutes until translucent. Add the minced garlic and red pepper flakes, cooking for another minute until fragrant.
Pour in the crushed tomatoes, salt, and pepper. Bring the sauce to a gentle simmer and let it cook for 5-8 minutes to thicken slightly.
Add the gnocchi directly to the sauce. Stir to coat, then cover the pan and cook for 3-5 minutes until the gnocchi are tender.
Stir in the heavy cream (if using) and remove the skillet from the heat.
Top with the torn burrata cheese and fresh basil leaves. Serve immediately while warm.