To capture attractive bokeh, you need a 'fast' lens – that is, one with a wide maximum aperture, ideally f/2.8 or wider (lower f-number). This is one of the main reasons to include a fast prime (fixed focal length) lens in your kitbag, even if the focal length is one covered by your kit zoom. A prime lens with a wide maximum aperture like the Canon RF 50mm F1.8 STM lens used here lets you blur backgrounds with ease, dissolving details into beautiful points of light. While a kit lens with a maximum aperture of f/4-5.6 or more will allow you to blur the background, it won't achieve the same quality of bokeh. Of course, a wide maximum aperture means the lens lets in more light, which is useful in low-light conditions too, when you can get really creative with bokeh.
There's another factor to consider too, although it's not as critical. Lenses capture blur in different ways, and some produce more pleasing bokeh than others. In general, a lens with more aperture blades results in more attractively circular bokeh, as each point of light mirrors the shape of the aperture. This matters less if you're shooting with the lens wide open – that is, at the maximum aperture (lowest f-number) the lens supports, when the opening will be circular anyway – but that won't always be the case. You can find out how many blades your lens has in the manual that came with it, or look it up in the specifications for your lens on the Canon website. Seven blades is great for attractive bokeh, but nine is even better.