They don’t need to tell you the cost, but they know what they’re going to charge you beforehand. They should be able to tell you the codes so you can give it t your insurance company to find out how much it will cost.
The reason healthcare providers don’t give out codes for known predictable procedures is it would enable customers to shop around. Instead, they want you to sign a paper saying you’re liable for whatever they claim you’re liable for.