Analogy compares things which are alike in relationship, cause, operation, throughput, etc. Similarity compares things which are alike in nature, shape, size, origin, and so on.
The way in which ocean liners transport people is similar to the way in which cargo ships transport goods; both vessels collect their payload from land-based ports, and carry them over water to their destination.
The way in which cargo ships transport goods is analogous to the way in which red blood cells transport oxygen. Red blood cells collect oxygen at the port (the alveoli in the lungs) and carry that oxygen through shipping channels (the blood vessels) until they reach their destination (the cells of the body).
I'm thinking out loud, don't take this too seriously!