That's a good, and possibly relevant, question. Are you sure those duplicated mp3 files don't exist in different folders?
Keep in mind the Music Player app is simply displaying whichever audio files it detects. so if you do have two of the same files in two different folders, your Music Player app is displaying those two files as is. Since you have a Samsung phone, that has a basic file manager app, My Files. Use the My Files app to check your file and folder arrangement. A file manager app has, by design, a different purpose. It's intended to display files and folders in real time, as is. Your Music Player is just showing you multimedia files.
So confirm your folder set up isn't the problem. Either move all your mp3s into a single, common folder, or weed out the duplicates in different folders individually. And yeah, if you have a lot of them, this could be a daunting project.
If however, you determine there are duplicates in the same folder, that isn't a possibility. Two files with the exact same name cannot exist in the same folder -- there's going to a difference of some sort to distinguish the two i.e. a capital letter in the name of one, lower case in the other; or a space character or some other otherwise obscure character.