A bunch of open applications can clog the RAM of even the most powerful PC. But closing unused applications with your hands is such entertainment. Everything should work automatically.
MagicQuit is a free and open-source utility for macOS that allows you to automatically close applications based on their use timeout.
The application has a minimum of settings and everything starts working immediately after launch. MagicQuit automatically detects the currently open applications and starts tracking their activity.
The default timeout period is 24 hours. To stop tracking an application, you just need to uncheck the checkbox opposite it.
You can change the period in the settings. Unfortunately, you cannot specify an individual period for each of the applications – only global. The minimum period is one hour.
Additionally, you can activate the display of a button to quickly exit the application.