That's not something you can do as a beginner in Linux. I'm porting Linux to a phone and even after using Linux for 18 years it's not an easy task.
If you want to use Linux on a phone, get one that is supported. (Or get comfortable with the shell anf inner workings of Linux and put in a lot of effort.)
For example, I've ported Mobian to the Pixel 3a and that works quite well and is cheap. Pretty sure others will have more recommendations.
TOTP really is not a good idea nowadays. I'd rather see WebAuthn. It's modern and actually efficiently protects against many things TOTP is supposed to protect against and even more threat vectors.