Wiring it "correctly" is a pain in the ass as you apparently need to wire it back to your fusebox, which depending on where it is, can be annoying in an already finished house.
I ended up buying one of there and just fed the wire to a plug on the other side of the wall. Works perfectly and I didn't have to pay someone $500+ to wire up my doorbell.
Still might not work for your rental if you don't have an outlet nearby, but I've been using one of these for over a year with no problems: https://smile.amazon.com/gp/product/B07BNDHR5Q/