As always, local conditions trump on-can directions.
Your drying conditions might be very different to those in the test lab in Behr, and anyway the number of coats you apply, how thick each one is, the interval between them, the moisture content of the wood, whether primer was applied first..... these are all important.
The drying (and, if mentioned, curing) times given on paint containers are sometimes conservative and sometimes unrealistic* but Behr are right to say 30 days because that is about what it should take a waterbased finish to completely cure, in average or typical conditions.
Do I need to wait 30 days before applying shellac or can I do it after 2Hrs, or 24 Hrs?
Depends on whether your conditions are average or not.
Unless you live in the desert I would not dream of applying shellac in 2 hours much less 24. I think you're almost certain to get crazing or some other problem (try a test on a scrap of wood).
Minimum wait before thinking about applying shellac I'd say would be about two days, being cautions you should wait a week at least and 10-14 days wouldn't hurt.
I need to sand brush lines from the painted surface. How soon can I start the final sanding before applying shellac?
You can sand when a finish is hard enough to sand. That's really the only standard to go by.
This doesn't require waiting for a full cure (although after fully curing finishes will sand as well as possible). For many waterbased finishes you can get decent results in a day or so, and again waiting longer would not hurt. Also again, you can do a test piece and find out what a good interval between application and sanding would be for your wood, your drying conditions etc.
*To make the product sound easier to use than it is.