I really thank you @eznix for caring to reply.
I already have a hook that sometime ago when I was on Grub that was fine. It reads as follows:
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = grub
[Action]
Description = Re-generate Grub if Updated
When = PostTransaction
Depends = grub
Exec = /bin/sh -c "/usr/bin/grub-install && /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg"
I believe it does the same as your reply or am I missing something? Sorry, I am no techie!
It does install Grub if needed I assume.
Why I made this thread initially is that I noticed in the other thread at Latest grub bricked my system (grub_is_shim_lock_enabled not found) OP said he installed Grub after the update which was supposed to make him avoid problems. But t happened though.
This is where my question comes from and why my question came up to my mind. It is about learning, curiosity that maybe a waste of time!