An historical example of analogy in science:
"…the Arab medical writer Rhazes (al-Razi), who believed that babies were born with watery blood that had to be transformed into dryer, more adult blood by boiling up, losing its moisture, and throwing its sediment out through the pores in a process analogous to the fermentation of wine."
theory of Abū Bakr al-Rāzī
Delacy, M. (2016). The Germ of an Idea. Contagionism, religion, and society in Britain, 1660-1730. Palgrave Macmillan.
Read examples of scientific analogies