Freud's theory of personality structure analysis divides personality into id, ego and superego.
The person who listens to his heart is the ID. Id follows the principle of happiness.
Listening to the brain should be regarded as superego. Follow the standards of moral and legal rules.
Ego is considered from the perspective of reality, which combines id and superego.
If you only consider from the simplest thinking, then listen to your heart. But listening to your heart is not always right. So we should consider other realistic conditions on the basis of happiness.