The first thing I do with a denim dress is pull the fabric between my fingers and see if it springs back or just sags. That's it, that's the whole test. Cheap denim has no memory, it stretches at the hips in the first hour and stays stretched, so by the end of the day you're wearing a shapeless sack with buttons down the front and wondering where your waist went.
A well made one has actual weight to it, a bit of structure even before it's on a body, and the stitching sits flat rather than puckering at the seams. Check the buttons too, proper metal ones that don't wobble, because a plastic button on a denim dress always looks like it's about to pop off mid sentence. The hardware on the pockets and the placket tells you more about the price point than any label does. And the hem matters more than people admit, a raw or frayed edge should look deliberate, not like it unravelled in the wash by accident.
Fit wise, you want it doing one job, not three. Either it skims and you add a belt, or it's fitted through the body and you leave it alone, but a denim dress that's trying to be both ends up flattering nobody. I've got one that's boxy through the shoulders and narrow at the hem, and it only works because I stopped trying to cinch it and just let it hang.
In terms of what it sits next to, think plain rather than fussy. A denim dress already has texture and colour doing a lot, so a simple top underneath if it's a pinafore style, flat sandals or boots rather than anything too dressed up, and a jacket in a completely different fabric, leather or a soft knit, so you're not drowning in one material head to toe. Jewellery can be louder here than the dress wants to be itself, because the denim sets a casual tone that a bit of gold or a bright bag can push against nicely.
If you've never owned one, start with a mid wash in a simple shirt dress shape with a waist tie or belt loops, something you can dress up or down depending on what you put with it. Avoid anything distressed or heavily faded as a first buy, it dates faster and shows wear in places you didn't choose.
The mistake to avoid is buying it a size down because denim "gives". It doesn't give the way you want it to, and you'll spend the whole day tugging at it instead of just wearing it.