Nancy Pelosi played a key role in efforts to pressure President Joe Biden to withdraw his candidacy for reelection in 2024