"Onesie" gets used loosely in Australia to cover almost any one-piece baby outfit, which is where a lot of the confusion comes from. Technically, a onesie usually refers to a bodysuit: a snug, short-bodied piece that ends at the nappy and is designed to be worn under other clothes, not as a full outfit on its own.
A romper is a complete one-piece outfit that includes shorts or a short leg built into the design, so it is meant to be worn on its own, not layered under anything. It has a snap or zip crotch for nappy access, and it typically covers the whole body from shoulders to upper leg in one piece, which is what makes it function as a full outfit rather than a base layer. For cooler days, an infant long sleeve romper does the same job but with full arm and leg coverage built in, so it works as a complete outfit on its own without needing anything layered on top.
Where it gets murkier is with jumpsuits and zip suits, which extend the romper concept with full-length legs for cooler weather. All of these fall under the "one-piece" umbrella that people often shorthand as "onesie," but the practical difference between infant rompers and bodysuits for dressing your baby is simple: a bodysuit needs something over the top, a romper does not.
If you are shopping and unsure which you need, think about the occasion. For a full, ready-to-wear outfit, reach for a romper. For a base layer to go under a cardigan, dungarees, or dress, a bodysuit is the better pick.