Backup -- https://en.wikipedia.org/wiki/Backup
The easiest way to have a backup is to us Time Machine included on every Mac - Mac Basics: Time Machine backs up your Mac - Apple Support
If you do not know what a backup is then you probably do not have one and therefore you have no possible way to recover anything due to user error or hardware or software failure
You should get a new external hard drive 2 1/2 times the size of your main drive and star using TimeMachine immediately - if you continue with no backup you are 100% guaranteed to lose everything including all of you photos sooner or later - an Apple TimeCapsule it a great and simple solution that works seamlessly with TM and you Mac
LN