Take a look here:
How to enable SSH using ncp-config or ncp-web
And don’t miss reading the other docs, some may be a little dated but nevertheless worth reading to get a better understanding what nextcloudpi is all about.
Setting up ssh acces you create a user which gets sudoer rights. There is no root user configured.