Thanks for visiting the Apple Support Communities Anja2023,
It is expected that if you delete the Music app, the music within it may also be deleted. If that music was synced to your iPhone from iTunes on a computer, you will need to sync them from the computer with the original files in order to get them back. Instructions for syncing can be found in Sync content between your Mac and iPhone, iPad, or iPod touch - Apple Support for Mac and Sync iTunes content on PC with your devices - Apple Support for Windows.
If you no longer have the original files (either still on your computer, or the original CDs), you will not be able to sync the content back. That said, if you use Apple Music you can obtain the music again via the Apple Music catalogue: Add and download music from Apple Music - Apple Support.
Have a wonderful day.