It is complicated and wavelength dependent. In near infrared, Hubble and JWST have about the same resolution. As the frequency moves further into infrared, JWST is better than Hubble. The other things that affect how clear an image is are “point spread function” - how much light gets scattered. And how steady the telescope can be held on one spot. Both of these capabilities are better for JWST than Hubble.