If you know how to use containers then go for debian as the server OS and run everything you need as containers.
Debian is community based distro, very stable, major updates every few years, ubuntu and other distros use it as a base.
Get familiar with working on the command line, try nano as an easy text editor und use docker compose.
I did not test TrueNAS, I do know the scale version can run containers too, but I do not know how stable ur usable it is. You should go for the classic linux approach with Debian. Much more fun to learn :)