To prevent a cake from sticking to a pan, you can
Line the pan with parchment paper so the cake doesn't directly touch the pan
Line the pan with wooden skewers so the cake doesn't directly touch the pan