I'm really confused about when we use the word "compare" followed by "to" and when followed by "with" to liken between 2 things.As I searched on internet there are a lot of different ideas for this stuff but I want to hear the most correct grammar usage.

could you please explain to me? thanks a lot !