for clothing - there was a time I could get a good estimate by looking at the pattern - but that was ages ago. Most often buying extra or less depended on the fabric choice. Something that was directional or would require matching often needed more.
I did custom garment sewing as my first career - near 40 years ago now (my how time flies!)
As far as quilts - I rarely use patterns so end up having to figure my own yardage most times. I guess that is why I prefer scrappy, I don't have to worry about messing up!
Most of my recent fabric purchases were for stash, so buying several yards was the norm.