Vecna learned the Spellweavers' secrets, then erased them from existence. Jergal somehow survived, and takes on the mantle of godhood reluctantly, to oppose Vecna.
Jergal becomes a god in Nethril in order to teach them to make what is needed to defeat Vecna. Vecna engineers the fall of Netheril by manipulating Karsus and/or the Phaerimm. Jergal splits most of his divine power between three gullible mortals in order to keep it out of Vecna's hands. Said mortals mess things up bigtime, forcing Jergal to step back in. Vecna moves his plot forwards.
OR
A particularly ambitious spellweaver deletes the others from existence and makes themselves a god.
As the god Jergal, the spellweaver teaches the Nethil to make the obelisks he needs for his grand design for Unlimited Powah. He then leaves his power in the hands of three mortals to keep his seat warm and leaves the Forgotten Realms for other planes of existence. Using the guise of Vecna, the last spellweaver puts his plan in motion on other worlds, such as Oerth and Exandria.
VECNA'S PLAN
The souls of the dead are supposed to go to their gods on the outer planes when they die. This empowers those gods (see BG3 epilogue, Ponzi scheme). The god of death is responsible for seeing those souls get there. If Vecna can become god of death everywhere, all at once, he can divert those souls, and hence the power of all the gods, to himself.