I have been working at the job for 2 years now
You're not new any longer. You're an established member of the team. The way you're being treated is not acceptable if it has been ongoing. I really encourage you to engage your co-workers and reach out to another leader of the organization to discuss what you're experiencing.
The existing answers are good, but I want to add some real options you have and a perspective from a manager.
First - the behavior you describe is not okay. Visible and vocal shows of disapproval or disrespect are major inhibitors of happiness and productivity in any workplace. There is no reason that you should not feel valued and respected at work.
Second, what are some real things -- in addition to what has already been offered -- that you could do?
1. Do nothing - You're new and it's not your job to manage the behavior of others on your team, including your boss. It's absolutely okay to tough it out, see if it gets better, and start searching for a new department or a new company if it doesn't.
2. Ask your coworkers for support and guidance - Share your observations and your feelings (about being put down) with your colleagues and see if they have made similar observations. They may have had similar or different interpretations of what happened. Ask your colleagues to back you up when you do have a valuable contribution, even if the boss is not acknowledging you.
3. Confront your boss - Ask for a private conversation with your boss. Offer your observations and feelings about your interactions so far. Offering objective observations ("You told me ...") and your own feelings ("... which made me feel ...") is important for keeping the conversation objective and avoiding implicit accusations. Be ready to hear your boss' perspective as well, and potentially criticism of your own behavior. Avoid getting defensive. Say "thank you for sharing that feedback" and move on from those criticisms -- they are for you to consider later.
4. Ask for help - Reach out to your recruiter, an HR team member, another supervisor or manager you're acquainted with, or just make a cold call to another experienced member of the company and ask for guidance and help. This isn't "going over your boss' head." Reaching out is about you getting guidance and support to help you feel confident and welcomed in your position.
I really encourage you to consider having a conversation with your boss or another senior member of the organization. As a manager myself, the feedback I receive from both tenured and new team members has been a huge part of my personal development. Many of the points of feedback have been very hard to hear and I didn't always handle the conversation as well as I could -- but I put in effort to change my behavior where it hurt my colleagues. I expect your manager may do the same.
Best of luck. New roles are always challenging. You've got this!