How do you get Favors for use with Patrons presented in Tasha’s?

In Tasha’s, new Patron rules are presented and a number of the patron Perks require calling in, or using a favor. I may have missed it, but how does one gain a favor? There are a number of references to downtime activities, so is it the same as gaining a religious favor (one of the Patrons is religious organization)? Or, is this simply a DM call: A favor is gained by completing quests and the like on behalf of the Patron? That might raise a follow-on question in regards to perk and being your own Patron.