Since chocolate and cocoa powder come from the same plant, you might be tempted to substitute one for the other in a recipe, especially if you only have one of them in your pantry. But the fat and flavour concentration in cocoa powder versus plain chocolate can actually make a huge difference. Image from seelensturm.
When you bake with cocoa powder, you're using an ingredient that has relatively low fat since it is primarily made from cocoa solids. Unsweetened chocolate, on the other hand, is made of those same cocoa solids and cocoa butter, making it much higher in fat. The lower fat content in cocoa powder makes the chocolate-y flavour more intense and can even change the texture of your baked goods (lower fat means less moisture). That's why you can't just chop up chocolate and hope to use it instead of cocoa powder in something like a cake or another baked good, even if the moisture isn't an issue. For more, hit the link below.