Using SuperGrub2
SuperGrub2 is a tool that can be used in most cases to boot a non-booting system and for troubleshooting.
Download Super Grub2 disk at https://www.supergrubdisk.org/super-grub2-disk/
Scenario 1: Boot a non-booting system
You just want to boot a non-booting system. As you want to reinstall it anyway, you do not care much about troubleshooting.
In that case you simply put SuperGrub2 on a USB stick, for instance using "Rufus" (on Windows) or "Ventoy" (on Linux or Windows), and boot it.
In most cases SuperGrub2 will find all the available OS on your PC. Simply select the OS that you want to boot and press Enter.
Scenario 2: Repair Grub
Your boot manager is Grub. The OS does not boot anymore or, in case you have a dual boot installation with Linux and Windows, the boot manager has changed and boots directly Windows.
In a terminal enter:
sudo update-grub
sudo fdisk -lu
Then install Grub, for instance on /dev/sda:
sudo grub-install /dev/sda
Now restart. In case you still did not succeed, check more Grub repair tools on "Linux Boot repair tools".
In case of error messages upon installing grub, check the pitfalls mentioned in the article "Repairing Grub with SystemRescueCD".
Check for more Linux related articles.