With code update shipping method dropdown in the cart page

Hi,

I’ve made a shop, where a user can buy multiple items from different producers.

I require charge shipping based on the weight of the items of each producer and sum it in the total amount of the shipping cost. I know how to do this by code, what I don´t know, is how to update the dropdown list of the shipping method and prices by code with mine results? (image attached in red)

All suggestions are welcome.
Thank you.