Hello,
delete /Library/Application Support/Avast directory, eg. by running Terminal and executing this command in it
sudo rm -rf /Library/Application\ Support/Avast
afterwards you should be able to install it again. If it still fails, restart the computer (that should not be needed for BigSur, only for older versions of MacOS in specific circumstances).
Kind regards,
Ondrej Kolacek