I've noticed lately that reflector telescopes are used much more than refractors. The majority of telescopes I see in telescope shops or featured by people online are reflectors. Even the Hubble and JWST are reflector telescopes. Is the reflector just preferred by a lot of people or are there real advantages of having a reflector over a refractor?
Several aspects of refractors limit their usefulness for large telescopes.
First is chromatic aberration. Because refractors focus light with refraction, and refraction varies at different wavelengths of light, a single lens is unable to focus all colors at the same point. Refracting telescopes try to correct this by combining a lens with a positive focal-ratio with a lens with a slightly longer negative focal-ratio and a higher index-of-refraction glass so the two dispersions (approximately) cancel out at the focus of the combined lens. The focal-ratio of these achromatic lenses is necessarily much longer than either of the constituent lenses. This has several disadvantages with respect to a mirror with the same diameter: first, the light has to traverse four surfaces rather than just one, at each surface some light is reflected back, and a flaw in any of the surfaces will distort the image; second, for a given focal length, the lens surfaces will be more strongly curved than the mirror, which is more difficult to get correct; third, the shortest practical focal length is necessarily longer, resulting in a longer and more unwieldy instrument.
Another consideration is actually supporting the optical elements. Mirrors can be supported from the whole surface of their back sides, while lenses can only be supported from their edges (or else you give up the lack of diffraction in the optical path which is the primary advantage of the refractor). Large lenses tend to bend slightly due to mechanical stress as the telescope is moved around the sky, reducing their image quality.
Very large recent telescopes have mirrors made in segments or meniscus shaped mirrors where the overall figure is maintained with supports that can dynamically adjust the mirror to account for mechanical stress. This would be impossible with large lenses.
Refractors are best suited for small telescopes optimized for minimal diffraction.
A supplement to the very good antlersoft answer:
There is a practical limitation on how much thick a lens can be. The glass (and the other optical materials) is transparent only to an extent.
While optical cables (made of glass) tens of kilometers long do exist, the glass used for lenses is made with different engineering compromises so it is much less transparent.
The net result from the limited glass transparency is that a lens that is few centimeters thick in the middle will lose a great deal of the light to the glass itself. One will get much of the light from the lens edges where the glass is thinest (and where the spherical aberration is worst). Pointless, isn't it?
The usual approach against the spherical aberration (to use only the central part of the lens) for a large, extinction-limited lens will get us almost no light.
There are also engineering limitations - e.g. how to make this much glass optically homogeneous? One will need to cool it down very very slowly just to avoid internal tensions and cracks and the glass may like to stratify in the meantime (creating a gradient in the optical properties).
You care much less about the materials in a reflector. Of course, you do care about them - the mirror has to be mechanically stiff and the shape has to be constant over an extended period of time, but the lens material has to have all of these mechanical properties in addition to the desired optical properties.
In addition to the answers above, and at the risk of sounding flippant, you can literally shoot holes in a reflector and it keeps working just fine. The Harlan J Smith telescope suffered exactly that. This is useful if your telescope, like JWST, might get hit by micrometeoroids.
Further, cleaning and recoating a mirror is easier. (Though not for JWST... )