By either obtaining one from a cost consultant (a “quantity surveyor”). Or from a builder. And, in the Creative Meeting I offer, I do an initial cost estimate.
The reliability of any cost estimate depends on the extent and detail of the information it’s based on. Meaning the design information such as drawings. And specifications for materials. To get a reliable cost estimate first obtain a comprehensive design at least in outline.
The information describing that design should cover all parts of what’s to be built. Estimates by a cost consultant are most likely to be more thorough than a builder’s. And they are most likely to include adequate allowances for risk (sometimes known as “contingency”).