I think it is all down to the preparation and base layers
Hence the quality of the workmanship is critical - but you can;t really judge that at the time - or at least the average person can't.
So the only chance you really have is to try and check previous work and references and then hope for the best.
Often you only find out is was sub standard a few years later - unless it is REALLY bad
indeed. And for that reason, it is always best to use an established local contractor trading on reputation.
More expensive but more peace of mind.
This < https://www.pavingexpert.com/ > is an outstandingly good source of guidance on all things paving and landscaping.
Good way to use this is to gen up on the industry norms for the Job in hand and judge the contractor by what they propose - and get a specification not just a price.