That depends on market and current material prices
This question gets asked a great deal and the answer is driven by the market and current material prices. Generally speaking, building up tends to be less expensive than a basement. That said, not too long ago, lumber was at an all-time high and basements were the better option. Check with your builder and they can advise you on the pros, cons, and cost of each.
If it's a brand-new build, building a basement can be less expensive than building a second story, depending on the specific location and other factors. A basement can be added during the initial construction process, with the foundation and walls already in place, while a second story would require additional load-bearing structures to be built. However, the cost of a new build can be much higher than a remodel, especially if it requires excavation, foundation and also the cost of the land. It's important to have a detailed cost analysis and to compare the costs of both options before making a final decision. Factors such as zoning laws, the local building codes, and the cost of the land would be considered.