The sudden closing of the TouchDesigner software

Does it occur in an empty project or an ongoing project ?
Which version of TouchDesigner do you have installed ?

As a first step, make sure that all your drivers, including integrated graphic drivers, are up to date and that your machine is free of bloatware.

The Bulk Crap Uninstaller helps in identifying unwanted or unneeded software: https://www.bcuninstaller.com/

Find the latest driver for your GPU at Official Drivers | NVIDIA
or use Nvidia Geforce Experience Update Drivers & Optimal Playable Settings

You can also make sure that your integrated GPU is running on the latest version available via Intel Driver Assistant.

You can use the AMD Adrenalin if you have an AMD Integrated GPU, in minimal install mode, via https://www.amd.com/en/technologies/software

:zap::zap::zap: If your machine comes with a proprietary power management software (From Asus, Dell / Alienware… etc), make sure that it’s setup properly to run TouchDesigner on the Nvidia / AMD DEDICATED GPU when plugged to power. Otherwise, it’s likely that TouchDesigner would run on the integrated graphics, hence it is important to also make sure your integrated graphics are up to date.