Can you feel a tooth cavity at its early stages, or only after there's pain?

Typically not. Typically not... Possible at the gum line due to recession. Prevention is the key to saving pain and your teeth. If you think you have a cavity, please see a dentist.
Early. The best care at anytime is preventive. I would much rather my dentist treat a problem early.