Cook the pasta according to the package instructions until al dente. Reserve 1/2 cup of the pasta water before draining.
In a large skillet, heat olive oil over medium heat. Add the onion and sauté until softened, about 3-4 minutes.
Stir in the garlic and cook for another 30 seconds until fragrant.
Add the tuna, breaking it up with a spoon, and cook for 1-2 minutes. Add red pepper flakes if using.
Toss in the cooked pasta and a splash of the reserved pasta water to loosen the sauce if needed.
Season with salt, pepper, and lemon juice. Stir in the chopped parsley.
Serve hot with freshly grated parmesan on top.