How do you even join in a conversation naturally?

For context this is highschool & please don’t say school doesn’t last forever because ik it doesn’t but I just want genuine tips 😭

Let’s say there’s a group and without already being acquainted with all the people— let’s say all of them slightly know of you but only 1-2 really talk to you and even then they’re not that close to you, so you feel uncomfortable walking up to the group and joining the conversation

but you have no other friends and are standing alone while everyone else is conversing

How do you even make friends in that situation especially when you often overhear everyone in that class at one point taking bad about someone and you don’t wanna become the next target. Like genuinely I just wanna build my social skills because I’m already seen as a loser but I think it would be even more awkward if I try to force myself into a conversation that doesn’t involve me like what would I even say “What are we talking about over here😎” like man without knowing them well that sounds weird especially if I was just sitting by myself in the corner a second earlier

I just wanna be friendly without coming off as unnatural or having bad social skills but idk how to even do this (Its even worse if you walk into a classroom where u know absolutely no one or if someone there already had a previous class with you and sees you as a quiet loner man)