Being 6'2" myself, this was quite a problem whenever we shopped for a boat.
Very generally, the sailing brochure ad industry likes to describe 6' as "standing headroom" in all print media (and nowadays web media...). Next, this is measured from cabin sole to headliner. If you normally and regularly go below wearing shoes or boots, subtract for sole thickness.
I enjoyed a truly great sailing Niagara 26 for ten years, but got tired of stooping on the inside. I recall it being about 5'10" under the hatch. About 5'8" forward a ways. It was so perfect
in every other way that I could forgive it.
For the past 15 years we have an Olson 34 that does actually have (just barely) 6'2" headroom with my shoes on.
When you find a design and model that you like, log in here or at an owner site and ask for a real-world measurement.
You may find that a lot of boats in the 30-ish range that have enough headroom for you sail poorly, including some very popular
It's an interesting and sometimes frustrating contest of compromises.
Keep us posted on what you see and like.
FWIW, one of the few really excellent sailing thirty footers with about 6'2" headroom is the Yamaha 30, but they are rare even on the West coast where most were sold in early 80's.