The computer game Europa Universalis made me realize that many of the great trade cities of the world are located at the mouths/estuaries/deltas of major rivers, and nearly every major river has an entrepot at or near the mouth, from New Orleans on the Mississipi to Lisbon on the Tajus to Hamburg on the Rhine, Alexandria on the Nile, Calcutta on the Ganges and Hong Kong on the Pearl. I gather this is because they can serve as a port for goods to change from riverboat to ocean ships, as well as fortifications to defend the river and outposts for levying taxes. The Danube is one of the most important rivers in Europe, passing through productive lands, and draining a large floodplain. Why did no major city form at the mouth? Is the terrain too marshy? The harbour poorly protected? Was it vulnerable to raids from seafarers? Was the river too long for viable trade, and the Black Sea too distant and closed off to bother shipping into? Am I being too geographically determinist about a fundamentally organic and stochastic process, seeking a just-so explanation about complex, contingent historical forces that can't be explained in a falsifiable, scientific way?
Do any of these factors apply to the mouth of the Amazon or the Yellow rivers to explain more broadly where trade cities arise or don't?
Geography certainly plays a role but the barrier you are thinking of isn't the delta (after all, that didn't inhibit other locations like Nile Delta to play a vital role). No, its the Iron Gates that acted as a big divider between the lower and upper parts of the Danube. If you look at the river from its source in Germany, you can see many settlements developped along its shores which then depended on both riverine trade and river crossing for their economy - Regensburg, Linz, Vienna, Bratislava, Budapest, Belgrade to name the largest ones.
But suddenly, the river wiggles through between the Carpathians and Balkan Mountains, theres still 1000 kms of riverflow till the Black sea and there isn't really any large city - there's Turnu Severin, Ruse, Braila, cities in the 100-200 thousand large and several smaller, but nothing global. Bucharest is only connected to it through a canal, Romania's main port, Constanca is also far from it.
Now, modern photos of the Iron Gates are breath-taking but not represenative of how they looked once. There was large hydroelectric damn built during the cold war which raised the water level. But back before the dam, and also before the Austro-Hungarian regulations (where they blew up rocks and created canals), it was a narrow, dangerous gorge, where the river that before the valley stretched 1,5km wide was in some placed forced to pass through cliffs just 200 meters apart, full of cataracts (German language stills calls this section of the Danube as Kataraktenstrecke) and the riverbed strewn with sharp rock formations, some protruding out, many not. Old engravings like this or this can help you get an idea of how people of the time perceived the gorge. Still, despite these late 19th century efforts, currents were still so strong locomotives had to aid ships in crossing until the dam was built.
Because of the nature of the gorge, it was simply not conductive to trade. Local navigators, named kalauz during Ottoman and dumendžibaša (rudder-master) under Serbian rule had to help guide the ships through. And there wasn't really an alternative - river Olt also breaks through the Carpathians from Transylvania, but it's much smaller river, has smaller towns on its shores, passes through an economically less active area.
It was not until socialist Yugoslavia and Romania built the Iron Gate Dam I and II between 1964 and 1984, a true megaproject of its time, that through raising the water level finally allowed safe passage for larger ships - though with it's own negative impact as well, particularly ecological (hindering passage of migratory species) and archeological (covering up sites, and even an entire island, which was a curious exclave of Turks, worth a read). But due to the cold war, yugoslav wars and following developmental differences, trade never really picked up between Central Europe and the Black Sea in a serious volume, despite the Rhine–Main–Danube Canal providing theoritical access between the North and Black Sea, at least not to the degree to replace other routes - Port of Constanca handles 55 million tonnes of cargo a year, while the largest Danubian one, Port of Vienna handles 12 million tonnes.
/u/hatsek has already provided an excellent answer regarding the Danube and I have little more to add here. However, regarding your secondary question:
Do any of these factors apply to the mouth of the Amazon or the Yellow rivers to explain more broadly where trade cities arise or don't?
The Yellow River carries a very high volume of silt - it's what gives the river its distinct color and its name. However, as a result of that silt flow the Yellow River has changed courses several times in its history as silt built up enough to allow the river to overflow its banks.
Even when the river did not entirely change course, the lower stretches of the river were prone to flooding which made it somewhat risky to settle dense cities too close to the river.
As a result, in the 2,540 years of high quality recorded history in the region, the Yellow River flooded at least 1,593 times and changed course at least 26 times, most recently in 1855, which in turn made it difficult for the various port cities that emerged at the mouth of the river to become too large or too permanent.
In addition, the Grand Canal built in the 7th century to some extent makes a port at the mouth of the Yellow River unnecessary, as oceangoing shipping can change to riverboats at Hangzhou in the south or Tianjin in the north and access the Yellow River via the canal. In many ways this was actually a more reliable way of connecting cities on the upper part of the Yellow River (e.g. Chang'an or Luoyang) to the ocean than descending directly down the Yellow River, although severe enough floods could damage the canal as well.
Also one other minor point:
Hong Kong on the Pearl
While Hong Kong does sit at the mouth of the Pearl, historically and actually even today Guangzhou was the main trading port on the Pearl River. While Guangzhou sits further inland than Hong Kong, the Pearl River is fully navigable between Guangzhou and the ocean (and indeed it is still navigable for quite a bit further inland) and as a result Guangzhou is perfectly accessible by sea.
The main reason why Hong Kong was chosen as a base for European colonists is that it has a protected deep water port that makes it an excellent naval base as well - a fact recognized not just by the British, but also by the Song and Ming dynasties who built major fortifications in Kowloon (now within Hong Kong).
I'm not sure if this question is more about history or geography, physical or economic. I'll try to answer it from the geographical standpoint.
Let's look at the two major European rivers, Rhine and Danube. The former is one of the most important trade routes in history, the other is not so much. At least a partial answer lies in their particular geography, both physical and economic.
Let's say you're a merchant in an inland city who wants to sell their goods overseas (in England, America, Japan or some colonies).
First of all, let's look at the map. There are two major sea routes in Europe, the North sea and the Mediterranean (Black sea is a lot less important). The Rhine goes from the Alps to the North Sea and there's no alternative river or land way for you if you want to ship your goods from inland to the sea. If you live in Zurich or Strasbourg or Koln - the Rhine is your best option to reach the sea.
However, that's not the case for the Danube (at least, not for the whole longevity of the Danube river) because there is multiple competition to the Black Sea route - the Adriatic, the Mediterranean etc. If you live in Vienna and you need to deliver your goods to Cairo or New York - you'd probably be better off going by land to Trieste and ship your product from there. You ONLY need a Black sea port if you specifically trade with a Black sea country.
Not only that but if you live in Vienna, doing business with England or other North sea kingdoms would probably be easier through the mouth of the Rhine! It doesn't work the other way, however: if you live in Koln and want some sweet Mediterranean trade, you'd probably travel only part of the Danube and definitely won't go to the mouth of the river.
This is the problem of physical geography of the Danube: at multiple points of this river it is closer (and easier) to conduct your trade from non-Black sea ports. Not the case of the Rhine.
In short, the Rhine opens the deep sea for you with countless trade possibilities throughout the whole world, the Danube opens for you a relatively small sea with relatively poor countries.
Another problem is economic geography. Throughout much of the history countries of the Rhine basin were and are significantly richer than countries of the Danube basin. Richer countries=more trade=bigger and more prosperous ports in the mouth of the Rhine.
Probably the only time when the Danube was running through a richer kingdom than the Rhine was the times of the peak Byzantine empire. And even then there was a big problem for the Danube because on one side there was this big, mighty, rich Byzantine empire and on the other side there were relatively poor underdeveloped tribes/kingdoms who constantly threatened the safety of the trade.