Trousers have had a proper overhaul in the last few years, and leggings have finally stopped being treated as something you only wear to the gym or under a long jumper on a bad day. Waistbands that actually sit where your waist is, fabric with real weight to it, cuts that aren't all skinny or all wide leg with nothing in between. It is a better landscape than it was, though it does mean more to wade through before you find the two or three things that earn a permanent spot in rotation.
If you are starting from nothing, go for a straight or slightly wide leg trouser in a mid weight fabric before you buy anything trend led or fussy. It covers more situations than you would think, sits well under a coat in autumn, and does not cling in a way that shows every seam of what you are wearing underneath. Leggings wise, start with a thick, opaque, high waisted pair rather than a thin cheap one, because thin ones pill at the inner thigh within a few wears and go see through exactly when you least want them to, usually bending over in good light. Fit is where most people come unstuck, not on the waist but on the length and the rise. Too short and trousers look like an accident rather than a choice, too long and they drag and fray at the heel within a season. Get the rise right too, a low rise on anything but the most structured trouser will gape at the back when you sit down, which you will only discover once you are already sitting down somewhere you cannot easily fix it.
Before you buy, check the waistband construction, a proper wide elastic or a lined waistband behaves far better over a full day than a thin single layer that rolls. Check the inside leg seam for leggings, flat seams wear better than ones that sit proud and rub. Check pocket depth on trousers if you actually use pockets, because plenty look like they have them and barely fit a hand. And hold the fabric up to the light, cheap leggings fabric is obvious the second you do this.
For colour, navy and a soft charcoal are easier to live with than true black, which shows every wash and every bit of lint, and a warm mid brown works surprisingly well against most tops without trying too hard. Leggings are best kept plain and dark, save the bold prints and colours for something you are not wearing three times a week.
Reach for straighter trousers when the weather turns properly cold and you need something that layers with boots and a coat without bunching, and reach for leggings on the days that involve a lot of sitting, a lot of walking, or both, and no real patience for adjusting anything.