This isn’t going to be what you want to hear, but issues like that are almost always because of either something with the way you set it up, or your hardware.
“Just works” is a myth. Nextcloud is a huge platform with many years behind it, and running a system like this is going to require some learning and some doing.
I’ve been running the same installation at home since Nextcloud 16. It’s been through an OS upgrade and every NC version from 16 to 20.
If you want to see how I did it and maybe try it this way yourself, I wrote a guide.