I don't think I can help fix it, but I can help decode the error message for you to get you started.
The Avecto application, which is a piece of endpoint protection/control software, is denying users on the Mac from using the sudo command. This is causing the errors you are seeing in the command line. The problem here is that unless you have admin control of your Avecto instance, you will be unable to grant yourself access to the sudo command.
The two lines with important information are
sudo: error in /etc/sudo.conf, line 2 while loading plugin "avecto_policy"
sudo: /usr/local/libexec/Avecto/Defendpoint/1.0/sudo/sudoers.so must be owned by uid 0
Normally, the /etc/sudo.conf file is used to customize the front end for sudo, but it can also be used to dictate security policy around the use of the sudo command, which is what we're seeing here. In this case, Avecto has modified the sudo.conf file to reroute the sudoers file to its own custom path. The sudoers file is the file that contains a list of any and all users/computers/groups that can run the sudo command. With the sudo.conf and sudoers files in this state, any user trying to use the sudo command must be approved by Avecto in order for them to be able to use said command.
The only odd part to me is the fact that the sudoers file is no longer owned by the root user (the root user's UID is always 0), which I'm pretty sure breaks the sudo command entirely. In the state the machine is currently in, only the root user would have the ability to execute commands as the root user. In order to rectify this, you would need to modify the security policy that your Avecto instance is deploying to the Mac and enable sudo for your user.
From my experience with avecto, that happens when the client is having issues.
Its deactivated and does not have a licence form the server , or is just not working properly. Usually, reinstalling the client will fix it, taking the admin elevations go trough the avecto client.
Uninstalling it with it's uninstall scripts should also work, but you will need an admin user to be able to do that.