The general rule is that a more specific Beracha precedes a general Beracha. For example, the Shulhan Aruch (211:3) states that the Beracha of Ha’etz precedes the Beracha of Shehakol, since Ha’etz refers specifically to the fruit of the tree, whereas Shehakol literally means everything. In the same vein, Ha’adama, referring to vegetables, also preceded Shehakol.
There is a Hebrew acronym, known as "MaGA ESh"-which literally means "touching fire," but actually, it lists the proper sequence for reciting the various Berachot: Hamosi, Mezonot, Gefen, Etz, Adama and Shehakol.
Nevertheless, this rule of thumb is limited, as there are many exceptions to this list. Therefore, one must study the Halachot. For example, Maran (211:3) rules that there is no preferred order when deciding whether to recite the Beracha of Ha’etz or Ha’adama, whereas the "MaGA ESh" would require first reciting the Beracha of Ha’etz. Even though Maran also brings an opinion that it is preferred to first say the Ha’etz, that is not the Halacha.
The Berachot Ha’etz and Ha’adama always precede the Beracha of Shehakol. There is no preferred order between the Beracha of Ha’etz and Ha’adama.