I’ve been experimenting a bit with glare lately, and, with the help of some YouTube videos, I found out that essentially, a lens mask’s Fourier Transform dictates the glare shape
So if your lens is shaped like a heptagon, then its fourier transform will look like this:
And plugging the image into the Bokeh Blur node in the compositor you get the dispersion effect for the glare:
Then, simply add in the blurred image to the original with the Mix Color node and you’re good to go!
The advantage to this method over the Glare is is you can make the lens any shape, for example a heart or a leaf, and the glare will still work.
The disadvantage is that it’s a bit more tedious and can take longer to process

