How to fix unable to stat /etc/sudoers on sudo

I’m using Pop Os 22.04 LTS and I moved the sudoers file to sudoers.bak, with the command sudo /etc/sudoers /etc/sudoers.bak. Then every time I try to run a sudo command it says that the sudoers file doesn’t exist.

I tried to use pkexec to run nano for editing the file and apt-get purge/install sudo for reinstalling sudo, but in both cases when I put my user password it failed with the message:

==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/bin/apt-get' as the super user
Authenticating as: (user_name)
Password: (password)
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.

I also tried to use su - but again, when I put my password I get an error saying su: Authentication failure