An example of analogy (and simile) in popular science writing:
"…picture water at the [sub]microscopic level. Everywhere there are water molecules, which look like tiny spheres. Every now and again you encounter a giant sphere, thousands of times larger than the water molecules. That's a pollen particle. What you also observe is frenetic activity. The water molecules are vibrating and wobbling, bumping into one another like bumper cars. The ones next to the pollen particle collide into it. It's as if tiny ping-pong balls are bumping into a giant beach ball from every possible direction."
Paul Sen (2022) Einstein's Fridge. The science of fire, ice and the universe. William Collins.
Read examples of scientific analogies
Read about examples of science similes