Does the same thing happen when you disable all plugins?
If the problem goes away, then start activating the plugins one at a time until the problem comes back, then you’ll know which plugin is causing the issue (and delete or deactivate it).
I tried that, But deactivating plugins doesnt work
This is an odd issue. It’s possible your media files have disappeared, but of course WordPress has information about them indexed in the database and will try to display them in the dashboard, even if the files no longer exist.
If you can SFTP in, or if you have access to cPanel or something similar with a file manager, check the contents of wp-content/uploads/ and see if your media files are still there.
I have checked it, The media files are there but not showing inside wordpress dashboard media files. But these issues started appearing after I transfereed my domain to my another hosting before that the site was okay and even now my site is okay there
Ah – that’s telling. How about the directory permissions? WordPress recommends these permissions.
If the directory permissions are such that WordPress can not read the directories or files, it’s basically the same as if they were not there.
You can change the permissions easily enough with an FTP client or a file manager.
The wp-content and all its child directories should be set to 755.
Also check – and I suspect this more likely – that the file and director owner is the same owner of your new hosting account. If you’ve migrated from another host, it’s possible the old file and director owner came along for the ride and never got updated on the new server. I’ve seen this happen many times before.