Create the user account
First, create the user account using the standard Linux/UNIX useradd command:
NEWUSER='newusername'
SSHPUBKEY='ssh-ed25519 AAAA..xyz jamieson@desktop'
sudo useradd -m $NEWUSER
Add the SSH public key to that user's authorized_keys file
It's critical to chown the directory back to the user, or the SSH daemon will reject the file that's owned by root and not $NEWUSER. (Another way to do this is to use ssh-copy-id, but this way can be done in the same login session.)
sudo mkdir /home/SSHPUBKEY" | sudo tee -a /home/$NEWUSER/.ssh/authorized_keys >/dev/null
sudo chown -R NEWUSER /home/$NEWUSER/.ssh
Set up sudo permissions for that user
This uses the standard /etc/sudoers.d directory (found in all major distributions) to add sudo permissions with an "ALL" role to the user account.
echo "NEWUSER" >/dev/null