She wasn't fired. Rather, her term came to an end, and Trump chose to appoint Powell as chair rather than reappoint Yellen. Yellen would still have been on the board until 2024, but she chose to resign instead. Firing implies her term ended prematurely, which isn't the case.