Since you are concerned about your photos you should either make a Time Machine backup of your system using the built-in Time Machine app with an external USB3.0 portable hard drive before upgrading. It will probably be fine, but I wouldn't want to take the chance especially when you can buy such a drive for as little as $70.
https://support.apple.com/en-us/HT201250
You could also manually backup your Photos Library from your home/Pictures folder to an HFS+ formatted USB thumb drive before upgrading, just in case.
https://support.apple.com/guide/photos/back-up-the-photos-library-pht6d60d10f/mac
Generally I would recommend upgrading at least to El Capitan 10.11 at a bare minimum, if not High Sierra 10.13 (if your Mac supports it) as a more reasonable minimum. It really depends on what your hardware is able to support and if you need to maintain compatibility with old apps or not. Mojave 10.14 is the latest macOS that has the highest compatibility with older (32-bit) apps. This has the links for various upgrade options, but for anything you would want to upgrade from 10.9.5 to 10.11 El Capitan first (whether you stay there, or decide to then upgrade further).
https://support.apple.com/en-us/HT211683