Yes, I too know what it's like to be baffled as to why my code isn't working like it's supposed to.
One thing I noticed is that if I'm following a tutorial and I miss a step somewhere (or I do a step a little bit wrong), sometimes that throws the code off. So if I'm doing a long tutorial, and if my code isn't working, then I get suspicious that maybe I missed a step in the editor, so I'll retrace the steps.
If I'm following a short code snippet as a tutorial, then sometimes the tutorial doesn't explain how the code snippet is supposed to be used. If you are following a code snippet tutorial then if you share a link to it, and share a bit more about your code, then someone might be able to make a guess about what is wrong.
Finally, if I'm following a long tutorial (like the ones in the docs, or a 30 min video tutorial), then if worst comes to worst I'll just start a fresh project and go through it again to make sure I didn't make any wrong steps. If after doing that it still doesn't work, then I get suspicious about the tutorial itself.