Preheat your oven to 350°F (175°C). Grease and flour a 9x13-inch baking pan or line it with parchment paper.
Make the cake batter:
In a large mixing bowl, combine the yellow cake mix, crushed pineapple (drained, but reserve the juice), shredded coconut, vegetable oil, and eggs.
Mix until the ingredients are well combined, making sure to incorporate the pineapple juice into the batter.
Pour the batter into the prepared baking pan and spread it evenly.
Bake the cake:
Bake for 35-40 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cake to cool in the pan on a wire rack for about 15-20 minutes, then transfer it to the refrigerator to cool completely (about 1 hour).
Prepare the frosting:
In a medium bowl, beat the softened cream cheese and powdered sugar together until smooth and creamy.
Fold in the whipped topping and vanilla extract until well combined.
Frost the cake:
Once the cake has cooled completely, spread the cream cheese frosting evenly over the top.
Toast the coconut (optional):
In a small pan over medium heat, toast the shredded coconut until golden brown, stirring frequently to avoid burning.
Sprinkle the toasted coconut over the frosted cake for an added crunch and flavor boost.
Serve:
Slice the cake into squares and serve chilled for the best texture and flavor.