Bank transfer is the worldwide default for long-term rentals and the method you should prefer, because every payment leaves a timestamped trail that protects you in any dispute. Set up a standing order for the due date and screenshot confirmations. Cash remains common in some markets and is legal in most, but insist on a signed, dated receipt for every single payment; a stack of receipts is your only evidence if a dispute arises. Checks survive in a handful of countries, and post-dated checks for future months are actually standard practice in a few markets, which surprises newcomers, so ask what's customary where you are.
On preferences and law: some jurisdictions cap how much rent can legally be paid in cash or require registered leases to run through bank channels, partly for tax transparency.
Whatever the method, make the contract state the amount, due date, payment method, and account details, and keep every confirmation for the full tenancy plus a while after.