This is a tricky question to answer, because the answer is probably very personal and what works for me might not work for you, and vice versa. But I can share some thoughts based on my experiences:

1. Practice. It sounds trite to say, but it's true... like most things, you get better with repeated effort. Luckily it's relatively easy to find / create opportunities to speak in group settings. Well... at least it was pre-pandemic. And will be again once more meatspace meetups and other events resume. But anyway, my point was going to be that many meetups and user groups and similar orgs are always looking for presenters. I've personally gotten a lot of mileage out of volunteering to speak at my local Java User's Group, Linux User's Group, etc. There are also organizations like Toastmasters which exist to give people opportunities to speak in a somewhat "safe" environment and receive constructive feedback.

2. When it comes to presenting, I find this approach valuable: do not write a "speech" or anything that you expect to recite word for word. This isn't like middle school where you have to memorize the Gettysburg Address and recite it perfectly and you get "dinged" if even one word is wrong. When you are presenting, whatever you say is correct by definition (it may be "factually incorrect", but it's "correct" in the sense that it's what you wanted to say and nobody can tell you that you "got a word wrong"). I believe strongly in focus on KNOW YOUR SHIT STONE COLD, rehearse your presentation mentally many, many times ahead of time, but focusing on the broad themes and concepts not trying to remember a specific sequence of words. What I mean by "know your shit stone cold" is, know your stuff down to first principles, where you can just start talking and explain the topic off the cuff with no preparation and no pre-arranged "speech".

3. Corollary to the above: if you use slides, do NOT read the slides to your audience. It's a waste of time: they can read, and they can read faster than you can talk. Treat the slides as nothing more than notes to yourself to remind you what you want to talk about. I can't emphasize this enough: do not, not, not try to repeat the exact words on the slides, either from memory OR by reading off the slide. Glance at it, remind yourself what point you want to make, and then just talk.

4. Further corollary to the above: despite what I said about "know your shit stone cold", I didn't mean "know every possible detail". What I really mean is something like "Have a solid conceptual understanding and know the fundamental principles that underlie whatever you're talking about." If there's a specific detail or something that you don't know, and somebody asks a question just say "I don't know. I can check up on that and get back to you later."

5. Regarding questions and comments that distract you: I've found that in every talk or presentation there is always that one person who asks some irrelevant / tangential / absurd question that has little or nothing to do with what you're talking about, and will not advance the present discussion. Why do they do it? Who knows... probably just to gratify their ego and to show off how smart they are. In either case, I think the best strategy is to "acknowledge, deflect, and ignore." That is, say something like "That's a great question, and I'd love to get into it, but that's outside the scope of the current talk. Now, as I was saying..."

6. I don't do the whole "imagine your audience naked" thing or any weird tricks like that, but I do encourage you to remind yourself repeatedly that your audience are just people... people like you. Except probably not as smart as you. Or not as informed on the topic you're talking about. Because if they were, they would be the one giving the talk. Right? So there's no reason to be intimidated or anything.

7. Regarding jokes, etc: I don't make it a point to tell jokes during most talks, but if one falls naturally out of the material I might drop it. And I will sometimes make a little self-deprecating comment if I commit some faux-pas or get tongue tied or something. I don't advocate a whole session full of self-deprecation and putting yourself down, mind you. But it's OK to show that you're human and fallible and not just a robot.

8. Modeling can be valuable. Watch presentations and talks by people you respect and admire, and see if you can incorporate a few elements from those folks and their approach. I don't advocate trying to outright mimic or copy somebody else, like "oooh, I gotta present just like Steve Jobs" or whatever. But you may find a mannerism here, a joke there, a quip over yonder, that you might want to borrow.

9. Personally I like to walk around a bit when I'm talking if it's something like a JUG presentation or something where that's an option. If it's an internal meeting "around a conference room table" kind of thing and you can't just get up and walk around, then so be it. But when that's an option, I find I feel more relaxed doing that, as opposed to standing behind a podium. I don't necessarily wander all over the place, but I don't like to stand rooted in one spot. Your preference may obviously vary on this point, of course.

10. "Don't borrow trouble" as the old saying goes. That is, don't go imagining all the "bad things" that could happen beforehand. Because by and large, there are no bad things that can happen. Let's say you're presenting to a group of executives at your company, and you're afraid that if you bomb the talk, you'll get fired. Nope. Not gonna happen. Unless you do something absurd like stand up and start spewing racist, misogynistic, anti-semitic, hate-speech filled with vulgarities and threaten to kill everybody in the room. And you aren't going to do that. So no, you aren't going to embarrass yourself so badly that you get fired, or demoted, or anything. Even the fear that everybody might start laughing is not realistic. I've been doing talks in front of groups for 25+ years in various contexts, and outside of intentional jokes, I've never had a large group of the audience bust out laughing. In fact, I'd say it's hard to get people to laugh. To the point that there are people who work very hard to figure out ways to get people to laugh, and very few of them can do it consistently (see: good stand up comics). So really, you're not going to get fired, you're not going to get laughed at, nobody is going to throw a tomato at you, etc. Whatever you're imagining, forget it. That stuff just doesn't happen in real life.

EDIT:

11. To add one more thought: some people recommend taking an improv class. I have taken "Improv 101" at a local improv club, and I think it was a great experience. And I do recommend it in general. What I can't say is how much it helped me with this specific issue, as I'd already been doing public talks for a couple of decades before I ever took the improv class. I think it would help somebody who was trying to get better at this, but it's hard to say for sure. Still, it's usually relatively quick (a 3-4 week class), not too expensive, and is fun and rewarding in its own right. So definitely something worth considering.

HTH. YMMV.