There are several reasons behind the global chip shortage.
The first reason is supply chain disruption due to Covid-19 Pandamic and Due to global lockdowns, chip production facilities were shut down, leading to the depletion of stocks. Due to the COVID-19 pandemic, more people had to stay at home and upgrade their electronic devices, such as webcams, monitors and computers in order to work from home and be entertained. The demand for chips was increasing but production at the same time was limited.
The second reason is China–United States trade war. In 2020, the United States government placed restrictions on Semiconductor Manufacturing International Corporation (SMIC), China's biggest chip manufacturer, which made it harder for them to sell to companies with American ties. These restrictions forced companies to use other manufacturing plants like Taiwan Semiconductor Manufacturing Company Limited (TSMC) and Samsung. However, these companies were already producing at maximum capacity. This was also a main reason behind behind the shortage because the production capacity of the whole industry is getting affected because of these restrictions.
And the main reason according to me is Taiwan drought. Taiwan is the leader of the global semiconductor industry, with TSMC alone accounting for more than 50% of the global market in 2020. TSMC's facilities used more than 63,000 tons of water a day. In 2021, Taiwan experienced its worst drought in more than half a century, leading to problems among chip manufacturers that use large amounts of ultra-pure water to clean their factories and wafers. This slowed down the production and is one of the main reasons for this global chip shortage.