Reproduce, isolate, fix
First reproduce the bug reliably. Then isolate the smallest input that fails. Only then change code. Random edits without reproduction waste time and create new bugs.
Read the error fully
Stack traces and compiler messages usually point to the exact line and type of failure. Train yourself to read them top to bottom before guessing.
Rubber-duck checklist
Explain the intended behavior out loud, state current behavior, and list assumptions. Surprising how often the bug is an incorrect assumption rather than a missing semicolon.