Mendelian randomization is a scientific method that helps us figure out if something is actually causing something else.
Let's say we want to know if eating carrots makes you smarter. We can't just ask people if they eat carrots and then test their intelligence, because people who eat carrots might be different from people who don't in other ways that could affect their intelligence--like maybe people who eat carrots also generally eat healthier foods, or maybe they have more access to education.
So instead, we can look for a gene that makes people want to eat more carrots (let's pretend such a gene exists). We can then compare the intelligence of people who have the gene to those who don't.
If we find that people with the gene are smarter than people without the gene, that suggests eating more carrots is making people smarter--because the only difference between the two groups is whether they have the gene that makes them want to eat more carrots.
This is how Mendelian randomization works--it uses genes that are randomly assigned at birth (like rolling a dice) to help us figure out if there's really a cause-and-effect relationship between two things.