Avoid outlets or "factory" stores (clothes are made specifically for outlets.) Avoid J.Crew, Brooks Brothers, Banana Republic, H&M, TJ Maxx, the Gap. Avoid anything that's gone bankrupt, or been acquired (JC Penney.) Avoid pretty much everything on Amazon.
One decent sign of quality is the thickness of the materials. Some manufacturers will actually note the weight (in gsm or grams per m2.) I have the exact t-shirt in 160gsm and 300gsm from the same company and the 300gsm feels way more substantial/high quality/will last longer. It's also the only t-shirt I've ever gotten compliments on. Of course, higher weights are also warmer. Another decent sign is the materials themselves. Avoid anything plastic-based (nylon, polyester, acrylic, microfiber, etc.) Some materials I love and would recommend in some cases (cashmere, silk, merino wool) but are less durable, so avoid those if you're going for uncool and reliable. High quality cotton and wool, depending on how it's woven, can last forever. Leather starts to age, but if you take care of it it can be a good look.
Also, don't have unrealistic expectations. Even the "best overall running shoe of 2022" from RunRepeat (who do serious running shoe reviews, tear them down etc) - is only expected to last 400-500 miles. Things have a finite lifespan.
You can also make a significant difference by how you wash your clothes. Washing gentle on cold (or hand washing) can make some clothes last several times longer, easily.
If you do all those things (buy high quality to start, made from wool/cotton/leather, wash gentle on cold) you can get 10 years out of a piece of clothing if you don't wear it too often. I've gotten a couple hundred wears over 10+ years out of several LL Bean shirts myself.