A bill that aims to help the US meet its climate targets has passed its final hurdle and is expected to be signed into law by President Joe Biden next week.