If all you have is a hammer, everything looks like a nail meaning

HOME PROVERBS

behaviour

If all you have is a hammer, everything looks like a nail

suggests that:
If a person is familiar with a certain subject or attitude, they might believe that it is the answer in everything and maybe they will treat everybody in the same way.