Your problem that most masserie, by definition, are in the countryside, so not easy to access by public transportation.
I think one idea would be to find one that is off a main road that might have a bus stop.
There are probably buses that run along SS 16; so look for a masseria off that main road. Here is one, but there must be others; write to them and ask about getting there by bus...
https://www.masserianarducci.it/en/
The masseria I stayed at last fall is just outside Ceglie Messapica, one of the prettiest towns in the Valle d'Itria. They have some rooms in trulli buildings. Also a small pool. It's a working farm and very cozy. You could write to the owner, Alex, and ask if he could arrange transportation into the town, or to a bus stop..he's very accommodating (took care of my parking ticket!) and speaks English fluently. He goes into Ceglie regularly so I'm sure he could give you rides; he has another small hotel, in the town:
https://www.masseriacamarda.it/eng/index.php
These are the kinds of things that would not be on a website, but could probably be arranged if you stay at a small masseria.
if you stay there, or in any of the smaller, more personalized masserie, that are still woking farms, I'm pretty sure you could be an observer in the kitchen even if they do not offer formal courses. I've had good luck doing that..