

Step 1: be psychologically prepared to break it all. Don’t depend on your services, at first, and don’t host stuff for others, for the same reason.
Yunohost? Good for trying out stuff, I suppose. I haven’t tried it myself. You could also try Debian, Alpine, or any other. They’re approximately equivalent. Any differences between distros will be minuscule compared to differences between software packages (Debian is much more similar to Alpine than Nextcloud to Syncthing).
4GB of RAM? Don’t set up a graphical interface. You don’t need a desktop environment to run a server. Connect to it via SSh from your regular PC or phone. Set up pubkey auth and then disable password auth.
I recommend setting up SSH login first, then a webserver serving up HTTP, only, accessible via IP address.
Next comes DNS - get a name at https://freedns.afraid.org/
Then add HTTPS, get the certs from LetsEncrypt.
Finally, Nextcloud. It runs kind of “inside” your webserver. Now you can back up your phone, and share photos with family, etc.
Eh, OP says:
… and is constrained by little RAM. My stance stands.