Draw the cash flow timeline.
Before reaching for any formula, draw what's happening on a horizontal line of time. Money in goes up, and money out goes down. Mark the unknowns clearly so you know what you're solving for. For a loan, the borrower receives the principal at t = 0 and makes payments out at every subsequent period.
At this point, two things are clear. The unknown is the payment, a single number that repeats. Because the money moves monthly, the interest rate also needs to be monthly. Converting the annual rate before using the formula keeps the timeline and calculation aligned.