Trying random things and repeating what works while discarding what doesn’t is how evolution works, but it’s not the same type of thing as a scientific or proto-scientific understanding (lots of cultures did proto-scientific at different times, and real science is much more recent and mostly worldwide).
Sure, that’s how we got humans from single-celled life, so it’s not nothing — but evolution is also why humans still have an appendix, why dudes have nipples, why the recurrent laryngeal nerve takes a stupid path from the brain to the larynx via the heart not just in us but even in giraffes, and why so many people descended from malarial regions have a gene where two copies gives you sickle cell anaemia.
So while I would agree that it is wrong to call something “superstition” just because one doesn’t understand it [0], if the people doing the rituals also don’t understand it then it becomes fair.
Consider the Covid pandemic: wearing a mask slows transmission, but every so often I saw people with a mask covering only their mouth and not their nose.
Consider people asking for an antibiotic for a viral infection. People who say “I don’t want chemicals in my food”. People who think 123456 is a really good password.
Consider a Diesel engine: you can run it on vegetable oil, including recycling used oil from a commercial deep fat fryer, if you filter it. Imagine two people who didn’t know why it needed to be filtered, one who wasted time filtering fresh oil and one who didn’t filter dirty.
Consider a small pacific island in WW2: one day a lot of strangers clad in unusual clothes show up in a big boat, make a long flat clearing, hold strange shaped objects to their mouths and ears while repeating a mysterious chant in a language none of the locals speak, then loud birds appear and land, laying eggs filled with wonderful treasures beyond measure.
Clearly these people are wizards, so when they all eventually leave, the locals copied them, carving their own mouth-and-ear totems from wood, sewing ritual clothing in the same style as the strangers’, chanting the same words.
A decade later, it works! Another giant loud bird lands, and people who look and sound like the old wizards emerge. The new arrivals seem perplexed, so you explain that you are all following the teachings of John Frum, trying to summon the great god Cargo.
This isn’t a value judgement I’m making here, because if it was I would have to condemn myself also. Nobody is immune to this. And something being a cargo-cult or any other kind of superstition doesn’t mean it doesn’t work, just that you’re only going to get a useful result by luck (e.g. because an aircraft had to make an emergency landing and your palm-tree runway with a bamboo observation tower and people holding hand carved toy radios looked good enough from a distance).
[0] likewise “supernatural” but in my experience the latter term is used by believers and the former by nonbelievers