A good ankle sock has a bit of weight to it even before you put it on, a density in the cotton that tells you it's not going to turn see through round the heel by October. You pinch the cuff between finger and thumb and it springs back properly, no slack, no sense that it's already halfway to being a sad grey loop round your ankle bone by Christmas. That's the whole test, really, before you've even tried it on.
In the shop, I turn the thing inside out, because the seam across the toe tells you everything. A flat, fine seam means someone thought about it, a thick ridged one means you'll feel it rubbing by lunchtime, especially in a pointed shoe. I check the fibre content too, proper cotton or a cotton and nylon mix with a bit of elastane running through it, because pure synthetic ones go clammy and start to smell by mid afternoon in a way cotton just doesn't. I check where the sock actually sits, because "ankle sock" on the label can mean anywhere from a sliver that disappears into a trainer to something that sits a good inch above the bone and shows under a cropped trouser, and that's a different sock for a different job. And I have a quick stretch of the cuff with both hands, because a weak elastic will tell on you within a fortnight, slipping down inside your shoe until you're walking on a wad of fabric under your toes.
Over months, a decent pair softens rather than thins, the cotton getting that slightly fuzzy, broken in feel rather than going see through at the heel, and the colour holds if you wash them inside out on a cool cycle rather than lobbing them in loose at sixty degrees with the towels. Cheap elastic gives up first, always, long before the fabric itself wears through, so if the cuff's gone slack the sock is finished even if the rest looks fine. Bright colours fade fastest, which is not a reason to avoid them, just a reason to expect a soft pink to eventually settle into something gentler, and I'd rather that than pretend grey never fades too.
If you've none worth keeping, start with a proper cotton pair in a colour you'll actually reach for on a grey morning, not the ones you bought because they were cheap and matched nothing.