The Age of this computer will Govern what newer version of macOS it will Qualify to install. Use About this Mac from the Apple Icon on Desktop - the required Information will be there.
With the above information in-hand - follow this How to get old versions of macOS and verify what version this computer Qualifies to install. For Best results use Safari to commence the download as Others may not work.
Safari will open a redirect and open the Apple Store where the download can commence.
macOS Mojave 10.14 hardware requirements Does your computer Appear on this list ?
Make Time Machine Backup is very useful and can be used to Revert to Previous Working macOS
Notation - Mojave is the Last version to support 32 bit applications / extensions and Drivers. Catalina, Big Sur & Monterey supports only 64 bit and there is no workaround.