Cook the pasta according to package instructions until al dente. Drain and set aside, reserving 1/2 cup of pasta water.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and sauté for about 1 minute until fragrant.
In a mixing bowl, combine the cottage cheese, Parmesan cheese, milk, salt, black pepper, and red pepper flakes (if using). Mix until smooth.
Add the cooked pasta to the skillet with the garlic. Pour the cottage cheese mixture over the pasta and stir to combine. If the sauce is too thick, add reserved pasta water a little at a time until desired consistency is reached.
Stir in the chopped spinach and cook for an additional 2-3 minutes until the spinach is wilted.
Serve immediately, garnished with fresh basil leaves if desired.