The word compare is used with to or with. Both are correct, but there is a small difference in meaning. We use compare with to put two or more things beside each other and look for differences and similarities. We must use compare to when we want to suggest that two things are similar:
Some historians compare him to Churchill.
Stockholm has been compared to Venice.
If you refer to both similarities and differences, use with:
Compared with last year’s result, we see a huge difference this year.
Most writers do not know the difference between compare with and compare to, or they don’t care. In American English, to is more common. But you, as a good writer, will of course know the difference.
As a writer I might compare myself with, say, Bruce Chatwin (and realise that I am vastly inferior to him), but I would never dream of comparing myself to Bruce Chatwin (implying that I might be as good a writer as he was).
So the little boy in the image above may compare his belly with his mother’s: ”Look, mummy, your tummy is bigger than mine!” But he may just as well compare his tummy to his mother’s and say, ”Look mummy, I’ve got a tummy too!”