Activate Terra, Magical Adept by paying 4 and tapping it, exiling it and returning it to the battlefield as Esper Terra.
When Esper Terra enters the battlefield with four lore counters on it due to Doubling Season and Pir, its fourth chapter ability triggers, causing you to add , and then exile Esper Terra and return it to the battlefield as Terra, Magical Adept.
When Terra, Magical Adept enters the battlefield, it triggers, causing you to mill five cards and return up to one enchantment card from among them from your graveyard to your hand.
Repeat.
By kicking off the sequence with Terra, Magical Adept's transformation ability, you transition into its transformed Saga side, Esper Terra. Thanks to the doubling and incrementing replacement effects of Doubling Season and Pir, Imaginative Rascal, Esper Terra enters with an overwhelming number of lore counters right away, immediately triggering its fourth chapter. This grants you a massive boon of colored mana while simultaneously resetting the permanent back to its front face, allowing you to trigger Terra, Magical Adept's entry mill all over again.