Biomass is a versatile renewable energy source that can be used in all parts of the energy system, but it is a limited resource and usage needs prioritisation. Here we use a sector-coupled European energy system model to explore the range of cost-effective near-optimal solutions for achieving stringent emissions targets. We show that provision of biogenic carbon rather than energy is the main value of biomass, with the energy system cost increasing by 20% if biomass is excluded. It is not crucial in which sector biomass is used if it is combined with carbon capture to enable negative emissions and e-fuel production. A shortage of renewable electricity or hydrogen primarily increases the value of biomass for fuel production, which appears as the marginal abatement option and is most sensitive to uncertainties. Biomass usage is significantly affected if the biomass is associated with upstream emissions.