The founder is hired by the nonprofit as the executive director (or in a similar leadership role). This way, the founder is paid, but they do give up all their authority to the board of directors, which governs the nonprofit and has hiring/firing authority of the founder's position.