A lot of people believe that it was entirely a CIA coup taking down Mosaddegh, but that isn't the entire story. The CIA certainly played a role for sure, but it was British MI6 that initiated the coup because England was going to lose billions of dollars worth of oil machinery and oil contracts under Mosaddegh.
It gets even more nuanced from there.
Mosaddegh reneged on the deal it had for years with the AOIC and was going to take over the oil fields under the guise of nationalization. England protested to the International court. The International court (ICJ) sided with Iran on the oil fields because they stated that the AOIC was made up of civilian companies with no standing. The British government actually owned a controlling 51% of the AOIC and said "screw that".
Britain was bankrupt at the time due to WWII, and it was losing the last of its empire as well. The country was deeply in debt and trying to claw its way out of bankruptcy. They were determined that there was no way that Iran was going renege on their deal with the oil fields and machinery. The oil was basically a life saver for their economy at the time.
Meanwhile, the Soviets were waiting in the wings wanting to make a deal with Iran so they could buy into their oil. That was not going to happen if the USA had anything to do with it. The USA, Britain, and a lot of other European countries were in a panic about the Soviets back then.
In the end........A lot of countries didn't cry all that loudly over the coup because of the Soviets and the creep of communism. And as a side note........some countries still resented Iran because they were a huge supplier raw materials to Hitler's Germany before and during the early parts of WWII.