Several Quran verses use the word "heart" where it should instead use "brain", while this can be explained off as a metaphor, phrases like this are used today e.g. "change of heart" which means "change of mind" or "a heart to heart talk" the heart doesn't literally talk it pumps blood, the real problem lies in the Hadith.
For example, this Hadith is transmitted in a few of the books and is graded Sahih.
Beware, in the body there is a piece of flesh; if it is sound, the whole body is sound, it is the heart.(Sahih Muslim 1599a)
The Hadith says that the "the piece of flesh"(physical heart) controls the whole body, which contradicts science, which says the "brain" controls the whole body. We also can't say that it is the soul that lies in the heart, because this Hadith is referring to the physical heart.
How do we deal with the fact that Islam gets the simple function of body parts so wrong?
Please no bs answers like, "we feel emotion in our heart so emotion is from our heart"(we also feel pain in our fingers too, does our finger have a mind of its own?)