The link you looked at is for a running system when the package manager can't exclusively lock a package to update it, that is not your problem!

You need to reinstall a grub loader, as it suggested you do in your first image.

Your second image showed a terminal so I take it you can get a terminal OK?

https://phoenixnap.com/kb/grub-rescue