Deleting the photos probably just moved them to the Recently Deleted album – which you can think of as being like the Trash on a Mac, or Recycle Bin on a PC. This gives you a chance to change your mind if you delete something, and then immediately regret deleting it.
You won't get the space back until the photos are permanently deleted, which happens
- After 30 days, or
- When you manually delete photos from the Recently Deleted album
whichever comes first.
Note that with iCloud Photos, deleting a photo on any device is taken as a request to delete photos on ALL devices connected to that iCloud Photos account, and to delete the copies in iCloud. So if you delete 4000 photos thinking that you're not losing anything because they're "safe in iCloud", that is not the way it works.