If you have backup before, you can directly recover your deleted files like photos , contacts, messages,call logs from them. If not, I think you may need a third-party software. I have tried Android Phone Recovery, and it has the Windows version-Android Phone Recovery and Mac version-Android Data Recovery for Mac.
There are some related articles which may help you.
How to Recover Deleted/Lost Files from Android Devices
How to Recover Deleted Photos from Android Phones
How to Recover Deleted or Lost Call History from Android?
