Aren't they mainly large so they have less hindrance of earth's atmosphere? Couldn't telescopes that are in space be smaller and have similar performance?
The are mainly large to increase resolution and sensitivity. Atmosphere limits how large you can make the mirror before hitting diminishing returns, but that is mitigated by good site selection, adaptive optics and lucky imaging (taking many exposures and keeping the least blurry ones).
Telescopes in space could have better performance, because you are not limited by atmospheric conditions for your angular resolution. But you still need a larger aperture to increase your theoretical angular resolution (see the Rayleigh criterion), and increase light gathering power.
For radio we might be able to make it work. But we currently don't have the ability to position satellites to within 10 nanometers, which would be required to make this work in the optical range that you have just killed off on the ground.
Large aperture means more light makes it into the telescope. JWST has a mirror assembly bigger than most ground based systems. It comes down to cost vs performance. For the cost of putting a small-mid sized satellite in orbit you can build one hell of an observatory that will function longer and have a much bigger tube. At a certain point it makes more sense to use orbital systems but only for certain types of experiments.