A really important part of coding is working out why your program isn't working the way you want it to and how to fix it. The more you practice this, the better you'll get at finding and fixing bugs in your code. You'll also get better at helping other coders fix bugs in their code! Here are some things to try...
Check our list of the most common Scratch issues and bugs and how to fix them: Scratch Bug-Hunter's Guide
If you couldn't find what you were looking for in the Bug-Hunter's Guide, you could try asking some friends.