The sudo command allows normal users to gain administrator rights that are normally only available to the root user. This post will show you how to create a new user with sudo access on Ubuntu without having to change the sudoers file on your system.
Create new Sudo users
To add a new user to your machine, you need to use the root user to be able to add a new user
Add the user to sudo group
Use the usermod command to add the user to the sudo group.
usermod -aG sudo <username>
To test your new user, type this commands:
sudo apt update
The command you gave with sudo should run with root privileges.