An example of analogy in popular science writing:
"Evidence for black holes also comes form the fact that according to the general theory of relativity, when two black holes collide, they coalesce into a single hole and release a great deal of energy in the form of ripples or waves in space. Remember, space behaves like a liquid, so waves can form in it in a way that's analogous to the way waves form in water. If two icebergs collide in the ocean, that causes ripples to spread outwards from the point of the collision through the water. Similarly, when black holes collide, that causes ripples to spread outwards through space."
Paul Sen (2022) Einstein's Fridge. The science of fire, ice and the universe. William Collins.
Read examples of scientific analogies
Many examples of science analogies are listed in 'Creative comparisons: Making science familiar through language. An illustrative catalogue of figurative comparisons and analogies for science concepts'. Free Download.