When constrained by other observations of the contemporary and distant universe, the CMB enables you to decode all sorts of fundamental cosmic properties. Compare the distribution of sizes and temperatures of the warm and cool areas and you can infer how strong the force of gravity was at the time and how quickly matter accumulated, allowing you to then deduce how much ordinary matter, dark matter, and dark energy there is in the universe. From here, it’s then straightforward to tell whether or not the universe will expand forever.