How do you feel about people who you’ve never spoken to in class trying to add you on social media just so they can ask you for notes?
Someone has done this with me and even sending me a message saying “hello how are you?”. I never speak to them so what’s going to happen is I get roped in to replying to them and then they ask me for my notes.
I hate this and do not want to share my notes with people.
How do I get out of this situation?
That's never happened to me so far. However in some of my classes the professors actually suggested that we get the contact of one or two classmates so that we can contact them in case a situation arises where we missed something. If I wanted to ask a classmate something if I could find a way to email them I would do that instead of adding them on social media.
I think it is your right to decide whether or not to share notes. Personally if a classmate contacted me asking me to share notes (which has never happened so far) because they missed a class due to whatever reason (sickness, bereavement etc - it wouldn't be my place to question why anyway), I would share them unless I didn't take notes, or seriously doubted the accuracy of my notes. If they were in class for the notes they're requesting, maybe they're asking in case they might have missed something or just wanted to see whether it matched your notes to have a better idea of whether their notes are accurate.
If you just don't want a situation where a student relies on you to take notes, you could politely ask them whether they could share their notes with you too because you want to make sure that your notes are accurate too, and while you're happy to share them if they took notes too, each student has their responsibility of gathering their information from the class. You could politely ask them why they are asking and which parts of the lecture notes do they need from the class so you don't have to give out everything. Or you could just be direct and say that you do not give notes to other students, nothing against them but you generally don't, and maybe state the reason(s) why. Or if there are other sources of information of the lecture, or if the textbook is sufficient for study, you could suggest that.
If the class is graded on a curve scale, I appreciate the concern better than if it was not, but on the other hand personally I wouldn't really want to wish that people do worse in the class just based on notes or no notes from you. However, if you don't want to share notes with a classmate that is your right, although in the situation of a classmate missing a few classes because of sickness etc personally I would. If for some reason the notes you take would be graded, then to me that would be a much more obvious reason to not share notes.
A situation where you don't really have a choice to not share your notes, which it doesn't sound like it is from your description (unless someone's asking you because they want to see if you take good notes before officially asking), is if a student with a disability has shared notes as an accommodation and you chose to be the notetaker (in which case if you still wouldn't want to share notes in that scenario obviously just don't sign up to be a notetaker).