Coal's market share in the US has been eroding for 15 years and will likely fall below nuclear soon. It has been replaced by natural gas and, more recently, renewables.
The reason that we "worldwide" have been building lots of coal plants is that China has been building lots of coal plants. This is despite China also building world-dominating quantities of nuclear, wind, and solar.
The reason China is adding so much coal appears to be that provincial officials get to book coal power production as economic growth internal to their province. By contrast, the electricity from renewables in Xinjiang shipped over HVDC transmission lines does not boost their province's economic growth numbers so they do not want to use it even if it would be cheaper.