If the images contain EXIF data, there are various tools such as exiftool sudo apt-get install libimage-exiftool-perl
to move images into directories such as year/month/day based on the time they were taken:
After you have made such changes, the files must be scanned again to update the filecache in the database:
occ files:scan <user_id>
there are a lot of other tools which can do the same but I am not aware of a nextcloud app which can do it, you will have to do it on the command line.