When you free up space on your device by deleting photos, the photos are not permanently deleted or lost. Instead, they are typically moved to a temporary folder within your device's storage. This temporary folder is often called the "Recently Deleted" folder and depending on your device, it may be accessible through your Photos app or your device's Settings menu.
Photos that are in the Recently Deleted folder will stay there for a certain period of time, typically 30 days, before they are permanently deleted from your device's storage. During this time, you have the option to recover the photos if you change your mind about deleting them.
It is important to note that if you use cloud storage services, such as Google Photos or iCloud, your photos may also be backed up there. In this case, deleting a photo from your device's storage would not affect the version backed up in the cloud.