Problem
If by accident you make a mistake in your sudoers file then you won’t be able to run sudo command after saving the file.
Solution
Following the answer here, you can simply run the command pkexec visudo, supply your password and provided you already had sudo permissions, fix the sudoers file, make sure that you save it using the Q when prompted, and you should be able to use sudo commands again.