How does buying more of a foreign currency devalue a nation's currency? If a country wants to devalue their countries, why does buying more of a foreign countries currency devalue their currency?

I was reading the top answer from this question How does a country devalue its currency? and it states that buying more of a foreign currency will increase the supply of the yuan. Why and how is that?
Simply because buying country A's currency priced in country B's currency means selling country B's currency.

Simplified but not simplistic example: say that you have 80¥ and want to buy 10€. When buying/demanding these 10€, you will actually simultaneoualy also sell 80¥ i.e. by doing so you become a supplier of (€-priced) yuans. And because selling an asset generally exerts a downward pressure on its price, the price of 1¥ expressed in euros will decrease. Hence the explanation you read.