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.
Fast lenses with a focal length of 50mm or more are generally best for bokeh photography as blurring the background can be more challenging with wide-angle lenses. That's because shorter focal lengths produce a larger depth of field at any given focus distance and aperture, so more of the scene from the foreground to the background will be rendered sharply, and you'll get less bokeh.
Top choices for cost-effective bokeh lenses include the Canon RF 50mm F1.8 STM and the RF 85mm F2 MACRO IS STM. But don't rule out wide-angle lenses. Both the RF 35mm F1.8 MACRO IS STM and the RF 24mm F1.8 MACRO IS STM work really well for creating a bokeh background in close-up photography as the depth of field shrinks with shorter focus distances.
For extreme close-ups, a really short focal length gives a tiny depth of field, maximising bokeh potential, so the 0.5x macro facilities of the RF 85mm F2 MACRO IS STM, RF 35mm F1.8 MACRO IS STM and RF 24mm F1.8 MACRO IS STM lenses come to the fore. The Canon RF 16mm F2.8 STM lens is also a good option for getting in really close to the main subject in a scene and isolating it against a blurred yet expansive background, thanks to its very wide field of view. This can add another creative element into the mix.
In general, a lens with more aperture blades results in more attractively circular bokeh, as each point of defocused light mirrors the shape of the aperture. It's not an issue if you're shooting with the lens wide open – that is, at the maximum aperture (lowest f-number), 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 by looking up its specifications on the Canon website. Seven blades is great for attractive bokeh, but nine is even better. Both of the macro lenses mentioned above have nine aperture blades, while the others have seven.
Canon's handy lens selector tool enables you to tailor lens recommendations based on your camera and the genre you want to shoot.