Since you've just upgraded, the easiest solution would be to downgrade. Start by listing your local package cache:
ls -l /var/cache/pacman/pkg/network*
Look for the second most recent version, the one that works, right now that would be:
/var/cache/pacman/pkg/networkmanager-1.40.2-1-x86_64.pkg.tar.zst. Run the downgrade command:
sudo pacman -U /var/cache/pacman/pkg/networkmanager-1.40.2-1-x86_64.pkg.tar.zst
Then restart network manager service, note that this is case sensitive.
sudo systemctl restart NetworkManager
If everything went correctly, this should restore network access immediately. No reboot required.
And if it happens to your VPS, just use recovery mode, chroot into your system and do the same procedure.