For years I thought trousers were a lost cause on me, too short in the leg or baggy at the waist with nothing happening at the hip, so I lived in dresses and told myself it was a style choice rather than a fitting room defeat. What changed my mind was trying on a pair with a waistband that actually sat where my waist is, rather than two inches below it, and realising the problem had never been my shape, it had been the cut.
The difference between a pair that earns its space in the drawer and one that gets worn twice then shoved to the back is mostly in things you can feel before you've even done the zip up. Good fabric has some weight to it, enough to hang rather than cling, and it shouldn't go see through the moment you bend to pick something up off the floor, which I have learned the hard way in a changing room with poor lighting and worse mirrors. Check the inside too. A proper waistband is faced or lined, not just folded fabric with a seam, and the hem should be finished rather than left to fray the first time it catches a heel. Zips should run smooth with no catching halfway, buttons should feel properly anchored rather than attached by what looks like a single loyal thread, and if there's a fly front, the stitching round it should lie flat rather than puckering, which tells you whether the machinist rushed that bit or not.
If you own none and want one pair that will do the most jobs, go for a straight leg in a mid weight fabric, in black or a dark neutral. It skips the fuss of working out whether wide leg suits your height, it doesn't need the structure a tailored pair demands through the hip, and it goes under a jumper or a blazer without an argument. Wide leg is a joy once you've got the first pair sorted, but it wants the right shoe and the right length or it swamps you, so it's not where I'd start.
In the shop, sit down in them before you decide anything, because plenty of trousers that look fine standing at a mirror turn into a tourniquet the second you're on a train seat for half an hour. Check the rise with your hand flat against your stomach, not just your eye, and look at the fabric held up to the light, since a lot of high street trousers that feel sturdy on the hanger turn translucent under a shop spotlight. The real pleasure of a good pair is smaller than all that though, it's walking down stairs and feeling the fabric move with your leg instead of against it, no pulling, no awareness of the trousers at all, which is really the whole point of them.