‘The Good, the Bad, and the Ugly’ is a prequel. But still true.
I had to look that up because it was released later.
Although filmed and released in the order of
'A Fistful of Dollars',
'For a Few Dollars More', and
'The Good, the Bad and the Ugly',
aficionados pointed out that the correct order to watch them are:
'The Good, the Bad and the Ugly',
'For a Few Dollars More', and then
'A Fistful of Dollars'.
'The Good, the Bad and the Ugly' is first because it's set in the U.S. Civil War.
'For a Few Dollars More' takes place after 'The Good, the Bad and the Ugly' because the bounty hunter, Colonel Mortimer (Lee Van Cleef), is Civil War veteran. There is also a newspaper in the film dated in 1872.
There is a shooting contest in 'For a Few Dollars More' where the target is the Man with No Name's hat. The holes in that hat can later be seen in 'A Fistful of Dollars'.
https://screenrant.com/dollars-trilogy-movies-order-connections-explained/