My bot is quietly working on hosting, but if I close the tab with my bot, then after a while it will turn off. If I go back to the site and check the logs, I will see that I have npm packages installed and so on every time.
Unboosted Glitch projects go offline to save resources after ~5 minutes of inactivity. The restart every 12 hours, thus you seeing the node packages being installed.
Either Boost your Glitch app or possibly host it somewhere else for 24/7 uptime.