Step 1: Prepare the Pie Crust - Preheat your oven to 350°F (175°C). If using a store-bought pie crust, thaw it according to package instructions. If making your own, roll out the dough and fit it into your 9-inch pie dish. Prick the bottom with a fork to prevent bubbling. Pre-bake the crust for about 10 minutes until lightly golden. Let it cool while you prepare the filling.
Step 2: Make the Custard Filling - In a large mixing bowl, cream together the unsalted butter and granulated sugar until light and fluffy, about 2-3 minutes. Add the eggs, one at a time, mixing well after each addition.
Step 3: Incorporate Dairy and Flavorings - Add the whole milk, heavy whipping cream, vanilla extract, and salt to the butter and egg mixture. Mix until fully combined. Gradually add the all-purpose flour and ground nutmeg, whisking until smooth.
Step 4: Add the Coconut - Gently fold the sweetened coconut flakes into the custard mixture, ensuring even distribution.
Step 5: Bake the Pie - Pour the custard filling into the pre-baked pie crust. Bake for 45-50 minutes, or until the filling is set and the top is lightly golden. A knife inserted into the center should come out clean.
Step 6: Cool and Serve - Once baked, remove the pie from the oven and allow it to cool on a cooling rack for at least 2 hours. Serve chilled or at room temperature, topped with whipped cream or Cool Whip and toasted coconut flakes if desired.