A default Ubuntu installation does not include many proprietary codecs that are needed to reproduce certain video formats and others. There's an option to add some of those during the installation by selecting the option to install third-party drivers, firmware, codecs, etc.
Typically users install a meta-package - ubuntu-restricted-extras
(replace "Ubuntu" with "Xubuntu" or "Lubuntu" for a tailored package for those flavors - to add codecs for 99,9% of the users' needs (rough estimate):
sudo apt install ubuntu-restricted-extras
Do this instead instead of the individual installations suggested in your error message.
Finally, VLC is irrelevant here and yet mentioned in the question. VLC is different from most similar players because it doesn't depend on system-wide installed codecs, it uses its own set of codecs. VLC would likely succeed where the native Ubuntu Video app without the required codec failed.
sudo apt install ubuntu-restricted-extras
, ignoring the individual installation suggestions. The error message you allude to is normal if there's another package manage running, like unattended updates.