Logic is the science that teaches how to think correctly and reveals the rules for finding the truth.
When Descartes said, "I think, therefore I am," he meant to express that the fundamental attribute of humanity is thinking. Humanity begins with thinking and ends when we stop thinking.
Thinking is also a "force" that guides and directs human actions. The rightness or wrongness of actions and actions, as well as their beneficial or harmful effects on people, are determined by thinking and the forms of thought.
While ancient theologians viewed logic as detrimental to theology, this attitude changed with the advent of Ghazali and Razi, and logic gained great popularity and was considered a form of fard al-kifayah. Ghazali even stated that the knowledge of someone who lacks logic cannot be trusted.