Preheat oven to 375°. Spray a 10-inch cast-iron skillet with cooking spray.
In a large bowl, beat butter and sugar with a mixer at medium speed until fluffy, 5 to 7 minutes. Add egg yolks, one at a time, beating well after each addition. Beat in coconut extract.
In a medium bowl, whisk together flour, baking powder, baking soda, and salt. Gradually add flour mixture to butter mixture alternately with sour cream, beginning and ending with flour mixture, beating just until combined after each addition. Fold in coconut. Spread batter in prepared skillet.
Bake until a wooden pick inserted in center comes out clean, 25 to 30 minutes. Let cool completely. Spread with whipped topping. Garnish with toasted coconut, if desired.
Recipe by Southern Cast Iron at https://southerncastiron.com/coconut-cake-4/