What were the goals of the Truman Doctrine and Marshall Plan?
To stop the spread of communism and promote American global influence.
In 1945 Europe was destroyed and in chaos and the victorious powers were already divided. Very quickly the new Cold War emerged.
In Germany the American French and British zones of occupation became West Germany and the Soviet zone became East Germany. This was replicated in Berlin itself.
The Soviet Union had set up a ring of satellite states in Eastern Europe to protect itself from attack by the West, and in Western Europe there were powerful communist parties in France and Italy.
The West led by the United States, felt threatened by the Soviet Union and communism. Their response was reflected in the Truman Doctrine and the Marshall Plan.
The Truman Doctrine was a political and indeed military commitment to help any country whose democratic structures were threatened by dictatorships (a clear reference to communism, specifically at that time a threat in Greece.)
The Marshall Plan was an economic rescue passage for Europe including importantly what was to become West Germany. The Americans felt that economic recovery in a devastated Europe was essential to promote social and political stability in the chaos which was post war Europe.
It was offered to the Soviets but rejected by Stalin who saw it as an attempt by the Americans to establish control globally. The Soviets developed their own parallel programmes which would prove to be unsuccessful.