Click on this link and read how to redownload music --> Redownload music from the iTunes Store on your iPhone or iPad - Apple Support
- Learn how to redownload music that you purchased from the iTunes Store. On iOS devices, Mac, and PC.
Follow the instructions in this support article to redownload apps and games from Apple --> Redownload apps from Apple - Apple Support
Worth noting:
Legal - Apple Media Services - Apple
H. DOWNLOADS
“You may be limited in the amount of Content you may download, and some downloaded Content may expire after a given amount of time after downloaded or first played. Certain Content may not be available for download at all.
You may be able to redownload previously acquired Content (“Redownload”) to your devices that are signed in with the same Apple Account (“Associated Devices”). You can see Content types available for Redownload in your Home Country at Page Not Found - Official Apple Support Content may not be available for Redownload if that Content is no longer offered on our Services.
Content also may be removed from our Services at any time (for instance, because Apple loses its right from the Content provider to make it available), after which it cannot be downloaded, redownloaded, or otherwise accessed from Apple. We encourage you to back up your Content regularly."
Items may be reissued in which case the new (e.g., "remastered") versions are not regarded as being the same thing.
If an app is no longer being supported by a developer or they simply no longer want to sell it, it may be removed from the Store. In that case it is no longer available for redownloading.
Also check:
Hide and unhide music, movies, TV shows, audiobooks, and books - Apple Support
Hide and unhide apps in your App Store purchase list - Apple Support