We now have an AI Tool to solve your doubts and queries: AI Code Debugger
Paste your code and it will give you a few suggestions on what could be the error in your code.
Pleas ensure that you share your feedback if the answer by the tool worked or not.