I listen to music as a way to relax. However, sometimes the brass section of orchestral works produce quite sharp sounds. Using an equalizer works and reducing the 5-44.1khz sections work, but then everything sound muffled. Is there a way to get rid of these sharp sound (I suppose that's a part of the harmonics of the brass section) without removing harmonics of other sections of the orchestra?
Rather than simple EQ, which as you've already seen kills all frequencies in the band you're dialling out rather than just in some instruments, I'd instead opt for Multi-Band Compression.
How you implement this is going to depend on what your music source is. On a Mac, it's pretty simple - get a hold of SoundSource & add it into your music routing
For each of those sources, or the global output, you can add plugins, the ones that come with the Mac itself, or 3rd party AU Units.
If you compress hard across all frequencies, then nothing will ever jump out. this is going to sound slightly unnatural if you push it too hard, but it will definitely tame any peaks, specifically by reducing their aggressive frequencies.
Round this off with a multi band limiter & you can brick-wall your output to never reach offensive levels.
This is actually the exact method I use for my media player Mac [HTPC] so I can watch movies whilst being able to clearly hear the dialog, yet not blow the walls out [or annoy the neighbours] when the explosions happen.
Images above from Sound on Sound - Multi-band Compression