How to use Termux safely
Just follow these principles:
When following a tutorial, make sure that you properly understand the goal and every instruction. Understand what commands you are typing and what they do.
Use root permissions only when necessary. Never run everything, including current shell, as root.
Install software only from trusted sources. Remember that even open source software can contain trojan functionality.
If third-party script asks for credentials, most likely it is a scam. Obfuscated third-party scripts are likely to be a scam too.
Suspicious files should be sent to VirusTotal.
Do backups regularly, preferably encrypted and stored on at least 2 hardware disks (HDD, in worst case USB flash stick) and 1 copy on cloud.
Don't think you are very careful and thus bulletproof for scam, phishing or trojans. Long random passwords, verified software and brain in head are nice, but being prepared to be pwned at some day is even better.
Remember that YouTube tutorials are made for profit and entertainment, but not suitable for education.