The role of speaker of the House is constitutionally undefined, but in the modern political era speakers have played a critical role both in legislating and campaigning and fundraising for their party.
Speaker of the House Nancy Pelosi (a Democrat) raised $87 million in 2019 for Democratic candidates and the party. During the 2018 midterms Speaker Paul Ryan (a Republican) raised over $70 million. Regardless of party, modern speakers have been--and are, in fact, expected to be--major players in fundraising and campaigning. They have generally tried to use their office in ways that benefit their party members and safeguard their party's majority status.