Market capitalism has one job: to distribute resources and tasks. To do that, it sets prices. It is completely clueless when it comes to values (how much good something can do) and costs (how much pain something caused to create). It instead uses “prices” to approximate both of those things, and uses markets to set prices.
Where supply meets demand, there’s the price.
Markets and prices are a really bad approximation of costs and values.
(And even as bad as prices are, market capitalism doesn’t even do a particularly good job setting them, with capital holders often manipulating them via artificially restricting the supply through monopolies or scarcity, and often taking advantage of externality costs.)
English is a sloppy, messed up thing and people are free to use “cost”, “value”, and “price” confusingly and interchangingly. I sometimes do, too. Point of this isn’t to be language police. It’s just to clarify that these three different concepts (call them what you will) in spite of having some overlap also do have some distinct qualities, and how we can think of them differently.