Communication is a shared skill across all kinds of performance - comedians, magicians and other stage performers use a variety of well-honed techniques to capture and hold an audience's attention, and many of them can be put to good use in the context of science and maths communication.
Storytelling
There are two senses in which storytelling comes into engagement, and the main one is that any talk or workshop you plan - or even just a short interaction e.g. at a stall activity - should have a story running through it. You should aim to have somewhere you start from - motivating why you're talking about a topic - then connecting each thing you talk about with a logical progression on to the next thing, and finishing with something interesting and impressive that your session is building towards. Having a big flashy ending isn't essential, but it should feel like your story is resolved and loose ends are tied up.
It is technically possible to put together a session as a deliberate selection of unrelated topics, but even if you're specifically framing it as that kind of 'pick and mix' session, there should be a reason or connection between the things you're talking about.
Another aspect in which storytelling is useful is that the abstract ideas you might be talking about can be made much more accessible by including stories about real people - including anecdotes from your own work/research, or from yours or others' personal lives, gives people more of a reason to engage with what you're saying. It's more interesting to hear about times when you've struggled with things, or reasons why you got hooked on things, or about mathematicians who came up with all the clever ideas, than just to explain concepts without involving human beings.
Obviously, think carefully before sharing your own personal details too freely. In the context of a fun anecdote, when you're not telling a historical story that needs to be factually accurate, it's also reasonable to blur the details slightly - either to avoid giving away personal details - 'this happened to a friend of mine' - or to make the story more engaging to the audience (for example, the school year I was in when an interesting maths thing happened to me is often coincidentally the same year the students I'm talking to are currently in...)
Comedy
Humour is a tool often employed in communication, since it makes a speaker more likeable, and this leads to people being more prepared to listen and believe what you're saying. Almost everyone already employs humour in their speaking, potentially without realising it - but it's possible to incorporate techniques from comedy performance into other communication contexts. Many science and maths stage performers have found great benefits from stand-up comedy training, since it teaches you how to handle an audience as well as incorporating humour into your talks.
If you've ever tried to write your own jokes, you'll notice there are some standard techniques to maximise how funny something is. For example, jokes are much funnier if the punchline comes at the end - even down to the level of ordering the words in a sentence so that the final thing you say is the thing that gets a laugh (otherwise the audience is laughing over what you're saying). This can also be applied to a mathematical explanation: the part of something that's going to make people stop and think should be given its proper space, and thinking about the structure and pacing of your wording can make an impact.
Stand-up comics maintain a delicate balance of control over the audience, since they rely on holding the audience's attention and if they 'lose the room' it can be disastrous. Since your audience is likely to be more interested in finding out new things about mathematics than in getting big laughs, this pressure is relieved slightly for you - they have an incentive to keep paying attention - but you can still benefit from keeping them consistently engaged by planning your talk well and pitching it correctly.
Sometimes you'll see a comedian stand in the same place to deliver all their material, but then when they land a punchline and the audience laughs, they might walk around the stage, or take the opportunity to move a piece of furniture microphone stand. This is a deliberate action which gives the audience permission to laugh, and also allows the performer to signal clearly (by stopping back in their speaking spot) that they're ready to start talking again. This kind of technique can be used effectively (and teachers in classrooms often have a 'spot' they use for this purpose!)
One golden rule of comedy is the 'rule of three' - since a good source of humour is establishing a pattern then breaking or subverting it, it's neat and efficient to give two examples of something which fit a pattern, then the third one is different to get a laugh. Mathematics is also often all about patterns, and finding examples that break the pattern can be a good starting point for investigation, as well as a source of humour and intrigue.
Another well-worn technique is the 'pull back and reveal', or 'rug pull': reframing what you're talking about, or holding back a key piece of information until the end, so that the sudden realisation, and resulting reinterpretation of the things you've said before, creates comedy. This is also often a good communication technique - using careful wording to hide that what you're talking about is actually something else, and the resulting surprise and discovery can be a great hook.
Callbacks are well-used in comedy, when a performer refers to something they mentioned earlier in their set (maybe reframing it in a new context, or having it pop up unexpectedly in a new situation). This will often get good laughs - partly because people enjoy the moment of recognition, and it can be possible to re-use callbacks several times in a set to build a familiar touchpoint, create a rapport with the audience and link together parts of your story.
Another valuable skill comedians develop is that of improvisation - partly, responding to interruptions and dealing with things happening in the room, but also incorporating new jokes and lines into their set in response to things which occur to them as they go along. Thinking on your feet like this can make your presentations more enjoyable (since the audience gets a sense it's 'for them'), but if you give the same talk often enough you'll learn the kinds of reactions and questions you get from the audience and be able to come up with good responses to them. If a comedian is performing a show repeatedly, the best ad-libs are built into future performances, and even if they can seem spontaneous they might be surprisingly well-rehearsed.
Improv courses and classes encourage people to come up with material, stories and ideas spontaneously, and as well as being great for training yourself to think on your feet, it's a valuable skill to develop. Comedy training courses are now widely available online, and we can recommend comedy trainer Chris Head, who also has some great books on comedy and writing.
Magic
One final type of performer to consider in this context is the magician. Aside from the fact that many magic tricks have a mathematical component to them, and are therefore well suited to mathematical workshops and demonstrations, there are also techniques magicians use with audiences to capture and hold their attention.
A lot of stage magic is about misdirection - focusing the audience's attention on things that you want them to be looking at, and away from things you don't. This can be achieved by reducing unnecessary distractions, doing something unexpected, or even just through where you're looking and focusing while you talk.
While you're probably not planning to bamboozle your audience and leave them guessing (since your goal is to help people learn), audiences find magic shows entertaining because they see the unexpected and inexplicable, and many want to figure out how something has been done - this is the same quality you want in a maths audience, and you can present something seemingly impossible to motivate the puzzle of figuring out the answer.
This is a sense in which maths/science shows differ from many stage magic shows, in that you are much more likely to give away how something works, since your goal is to explain this - but you can still use the momentary surprise, intrigue and excitement that comes from seeing something impossible, but then you have the added bonus of your audience seeing behind the curtain and developing an understanding and insight to take away.
One final important lesson to learn from magic performance is that it's crucial your audience sees the magic trick in the right way. It's often necessary to first establish what you might normally expect to happen in a situation, before you perform an impossible feat - since then you get the maximum distance between the impossible and the expected. Some maths concepts might need outlining carefully before or alongside an impressive result - in the way a magician might say 'I have nothing up my sleeve', you can emphasise and flag up which aspects of something are key to it working properly, then reveal the exciting conclusion.
The video below, Demo: The Movie, is designed for science teachers to improve their use of scientific demonstrations in the classroom. Maths communication can benefit hugely from using engaging demos (although not all of them are as impressive as science demos can be!), and many of the techniques discussed in the film are more widely applicable to maths communication.
In the short segment starting around 15 minutes in, Elin Roberts discusses use of the 'catch-hold-reveal' technique to engage an audience (but the whole video is worth watching if you can spare half an hour!)