This is a multi-criteria decision problem or multi-objective optimisation problem, depending on how you want to look at it.
There are hundreds of methods for assessing these problems, from simple intuitive methods through diagrams like decision trees to linear programming to more exotic stuff like nature-inspired computing.
The simplest is to estimate expected value and expected cost, and to derive expected outcome. This is the intuitive model that most people follow. A slight elaboration is the Weighted Sum Method, where you arrange alternatives and criteria, then weight them and sum the result.
The key problem: multiple solutions
The key thing to understand is that you might not find a single best option, given the method and the inputs. Optimisation problems can and often do throw up a "Pareto front" of alternatives that cannot be strictly ranked from "best" to "worst". You can use tools to make the decision easier, but you will still need to exercise judgement.
An example that was used in a course I took was based on work commissioned by an iron ore company. They wanted to optimise iron ore crushing plants for profitability. This means deciding how much money to spend on an ore-crushing plant. Different configurations of crushers produce different fineness of ore, which fetches different market prices.
So this particular group of academics applied a genetic programming system to evolve model plants, with profitability as the selection function. At the end of the runs there would be a long string of alternative crushing plant designs generated that were indistinguishable for profitability, trading off between iron ore grade and construction and operations cost.
Ultimately the problem that the commissioning mining company ended with was the same. There was no one best solution. There were many equally best solutions.