There’s no one right way, but I can tell you what my experiences have been, and why I’ve ended up where I am, in terms of gear.
Bicycle commuting is easy when you have a short commute and the weather is moderate (dry, neither too warm nor too cold). Some people do it with nothing more than an elastic to keep their pants out of the bike chain. Personally, I recommend against that, because cycling is really hard on dress clothes, particularly the seat/crotch. When I worked somewhere I could wear what I wanted, I was wearing much heavier & tougher pants in winter, and I’d still wear through the seats in just a few years (even while the rest of the pants were just fine).