Troubleshooting program issues is very individualized. You really have to examine the code, understand what it should look like, compare to what you got, identify the error, and know how to correct it. There isn't just a list of things to try that will guarantee you'll find and correct the errors in your code.
Having said that, there are some basic steps you can take that will likely help you at least find the error. There are also some common syntax errors like an extra space, missing a comma, etc. so those are often the first things I look for when a program won't even run.
Read the document below to help guide you through some basic code-troubleshooting-steps.
I highly recommend you use this "Visualize Code" tool (Google "Visualize" and [insert programming language]) for debugging your program. It works with Python, JavaScript, Java, etc.
Open the link on PythonTutor.com, select the programming language at the top, paste your code in the editor, click "Visualize Execution" and click "Next" to step through the program and watch the output and variables change on the right-hand-side of the screen. Click "Last" to jump to the end.
Sometimes you just need a simple example of some code to get started. I highly recommend you check out W3Schools.com. They have lessons and simple examples of code for Python, Java, JavaScript, C#, HTML & CSS, etc.
Click the link above or Google search "W3Schools" and [insert relevant programming language].