How is iPhone Storage automatically cleared up?
App containers include a folder called Caches. This folder can be emptied by iOS when storage becomes low.

iOS chooses apps which you use rarely and apps which have large quantities of cache stored to be cleaned first. iOS shows the app name as "Cleaning…" briefly on the home screen when this process takes place.

There are other system caches which can be cleared too, but caches within containers are usually the largest and first to go.