Which application is missing on your Mac? The title of your question mentions "Photos", but in the body of the question you mention iPhoto?
The Photos.app, the successor to iPhoto, is installed by the system as a part of the system. You should be seeing it in the Applications folder.
On Mojave you could still use iPhoto, but it is the last system version to support it. iPhoto is no longer sold by Apple. You can only download and install it, if you previously purchased a version from the App Store, on OS X 10.9 or older.
If you have owned an App Store version of iPhoto and it is associated with your Apple ID, you should be seeing it at the AppStore, when you open the list of your previous purchases. You should be seeing a download link, when close to the iPhoto icon.
But as Mojave is the last system version to support iPhoto, you should migrate your iPhoto Libraries to Photos, before you upgrade to a more recent system version.
Even on macOS 14 Sonoma I can still see iPhoto in my list of purchases and can download it on my old Mac with Mojave. This screenshot is from macOS 14 Sonoma.
