The main reason President Truman proclaimed what would become known as the Truman Doctrine in 1947 was to prevent Greece and Turkey from falling under Soviet rule.
To arrive at this answer, you can examine historical records, speeches, and discussions surrounding the Truman Doctrine. President Truman's proclamation of the Truman Doctrine was a response to the perceived Soviet threat to Greece and Turkey. By providing economic and military aid to these countries, Truman aimed to support their efforts to resist communism and prevent them from coming under Soviet control.
You can find primary sources such as Truman's speech to the Congress on March 12, 1947, where he explicitly stated his concerns about the Soviet influence in Greece and Turkey. In his speech, Truman argued that it was necessary for the United States to support these nations to protect democracy and prevent the spread of communism throughout the region. This became the basis for the Truman Doctrine and the subsequent U.S. policy of containing communism.