Exoplanet transit
When a planet passes in front of its star, the starlight dips slightly. Measuring that dip reveals the planet's size and orbit.
If a planet's orbit is seen almost edge-on, the planet passes in front of its star once per orbit and blocks a small fraction of the light. The dip in brightness is roughly the square of the ratio of the planet's radius to the star's radius, about 1% for a Jupiter-sized planet around a Sun-like star and less than 0.01% for an Earth-sized one. The spacing between dips gives the orbital period, and the depth gives the size.
The first transit was seen in 1999 for the planet HD 209458 b. The Kepler and TESS space telescopes have since found thousands of planets this way. Combined with radial-velocity measurements, which give the planet's mass, the transit method yields its density and so hints at whether it is rocky or gaseous. During a transit, a little starlight also passes through the planet's atmosphere, and spectroscopy with JWST can then reveal which molecules are present.