The purpose of a hypothesis test is to validate an assumption. Statistical significance is the indicator of the validation. Adequate sample size is the pre-requisite. Minimizing cost while doing a hypothesis test may be an ask, but minimizing risk or damage is a need. Keeping all these factors in mind, let's now address the question.
Adequate sample is a pre-requisite, therefore my choice of approach will depend on the availability of sample. But minimizing risk is a need, so I want to be able to validate my assumption with the least casualty.
So if I were experimenting a drug's effectiveness through a clinical trial on monkeys, I will not take a pre-determined sample size as I would like to minimize casualty. I would start with the least possible sample size, and increase slowly to be able to reach a decision point. Such a trial will stop immediately at the first evidence of failure, to minimize future casualties. That, is the tolerance level of such a trial, which is defined at the onset. Please note that a casualty may not mean death, but the surfacing of unexpected symptoms beyond the perceived effects of the drug.
Now if I were experimenting a new version of a website to see if it generates more footfall, I would typically use the same incremental approach, but this time, I would potentially create different treatment segments and whenever a specific treatment reaches statistical significance, I would stop the trial. That minimizes cost.
Lastly, if I were to conduct a hypothesis test to predict which party would win the election, and if I had the ability to pull the required sample without much cost or risk, I would take the second approach due to availability, and less exposure to cost and risk.
However, having said all that, we need to be cognizant of the alpha, and the difference to be detected. If I were to prove something with the best possible certainty, and I know what difference is critical, we need to be able to bear the cost of a higher sample while casualty minimization remains a priority and a potential show stopper.