Around the age of two, “no!” becomes a favourite word. No to the bath, no to shoes, sometimes no to something your child wanted a minute ago. It's exhausting, but it isn't spite.
Your toddler is discovering they're a separate person with opinions of their own. What helps most is calm, fewer questions that can be answered with “no”, and play where there would usually be a fight.