In order to get rid of Taishang Laojun's puppet, the Jade Emperor cooperated with Buddhism to fight against Taoism. For this reason, several battles occurred in heaven. After two fierce battles in the Heavenly Court, Taishang Laojun launched a third contest. Daozu set up a trap to burn down Pantaoyuan, burning the foundation of the Heavenly Court.
Fortunately, Guanyin Bodhisattva came to the rescue and saved the 3,600 peach trees in the peach garden, preventing Taishang Laojun's conspiracy from succeeding. Immediately afterwards, the Jade Emperor launched the fourth contest. He set up a trap for Sun Wukong to be born and cause trouble in the Heavenly Palace, and stole all the nine-turn golden elixir, the foundation of Taoism. During the trough period when Taoism had no golden elixir, the Jade Emperor and the Buddha directed Tang Monk's Search for Buddhist Scriptures.
If you want to know the first three struggles in heaven and more subsequent truths, please stay tuned to "The Fog of Journey to the West"