You cannot use ‘sudo’ for executing commands that requires root access unless your username is listed in the sudoer file. After a fresh installation of Debian, you have to add your username to the sudo group to make ‘sudo’ works.
You can do that simply by executing the following command in terminal window:
sudo adduser username sudo
Replace username in the above command with your username.
After executing the command, log out and log in back to make ‘sudo’ works for that username.