The spikes are caused by diffraction of light around the struts supporting the secondary mirror. Hubble has 4 supports for the secondary mirror. JWST has 3 support for the secondary mirror, which because...physics (I don't know I'm not an optics guy)...manifests as 6 diffraction lines.
EDIT: It may be caused by both the diffraction spikes from the supports struts and the shape of the mirror and aperture. I'm not really sure. The JWST images also seem to have two additional small spikes that look more like the diffraction pattern from a single strut, which could also be a support strut for a stop further down the optics chain.
Apparently the Diffraction spikes come from both the primary mirror shapes and the struts holding the secondary mirror. The primary mirrors of the JWST are hexagonal which would explain hexagonal looking effects. The three struts are apparently designed so that two of the struts match the hexagonal mirror angles at all times and are "hidden" inside. (The third strut apparently sometimes causes two much smaller "horizon" spikes for very, very bright objects.)
Hank Green on TikTok did a neat, quick demonstration in video form.
Oh, thank you that makes sense. And due to the folding of the mirror and launch envelope constraints they can't equally space the three struts such that ALL are inside the diffraction of the hexagonal mirror.
https://en.wikipedia.org/wiki/Diffraction_spike
EDIT: It may be caused by both the diffraction spikes from the supports struts and the shape of the mirror and aperture. I'm not really sure. The JWST images also seem to have two additional small spikes that look more like the diffraction pattern from a single strut, which could also be a support strut for a stop further down the optics chain.