Preheat oven to 325°F (163°C).
Beat softened cream cheese until smooth and lump-free.
Gradually add sugar and beat until incorporated, scraping bowl as needed.
Add eggs one at a time, mixing on low speed.
Stir in vanilla and sour cream, then fold in flour if using.
Pour into prepared crust and bake 50–60 minutes until edges are set and center slightly jiggly.
Turn off oven, crack door, and let cheesecake cool inside 1 hour to prevent cracks.
Chill at least 4 hours before serving.
