Ganesha or Vinayaka is a position. The reign over the obstacles is like a position. There have been various rulers of the obsttacles till now and the way they take births are also different. The son born of Shiva and Parvati was declared as the leader of the obstacles many times in the previous Manvantaras and Kalpas. So, it is not the same person. Similarly, Padma Purana also gives the story of the birth of a Vinayaka made by Parvati with the unguents in the Srishti Khanda Chapter 43.
433b. Taking those unguents used for rubbing and cleaning
the body, she prepared a human (shape) having an elephant's face.
The respectable lady (i.e. Parvati) while playing, once threw that human (form) into the water of the auspicious friendly Ganges. Then that (form) turned into one having a big body (i.e. increased in size).
With his very vast body he filled the world. The respectable lady ( i .e Parvati) addressed him 'O son'; and jahnavl (i.e. Ganga) also called him 'O son'.
That form having the face of an elephant, was worshipped by the gods as Gangeya (i.e. the son of Ganga) ; and the grandsire, gave him supremacy as Vinayaka, over the attendants (of Siva).
So, it is clear that the position of the Ganesha (lord of the Shiva Ganas) is given to different elephant headed gods. There are multiple accounts on how they got the position.
Vamana Purana gives a story where a tiger was bestowed the leadership of Ganas by Brahma on the request of Parvati. Following is an excerpt from Vamana Purana Chapter 54.
When Parvati was seated on the Penance, a tiger having sharp teeth and nails came there from an adjacent forest.
He thought to pounce and eat flesh of Parvati when she will fall because she was stood on a single foot.
That tiger stared on the face of Parvati with an imagination that soon or after, she will fall from mountain and he will satiate his hunger.
Then the Goddess did penance as long as the period of hundred years. She was chanting Brahma mantra. Brahma, the master of the three worlds then appeared there.
Brahma said to Goddess - O Sanatani! I am glad to see you. You are absolved of sins now. Ask whatever pleases you.
Kali replied - O lotus born! Please grace on this tiger. It will really be the more cause of my pleasure.
Brahma bestowed that tiger the leadership of Ganas, devotion to Shankara, religion abiding and unconquered.
How to attain the position of Vinayaka:
There are two ways prescribed in the Padma Purana Srishti Khanda.
One should offer sesamum seeds to the manes on a new moon day through out the attains the position of Vinayaka.
- He, who offers sesamum to the manes on the new moon day throughout a year, obtains the position of Vinayaka, and is honoured by all gods. [Srishti Khanda Chapter 49]
One who drinks the water from their parents feet becomes free from all the sins and gets the position of Vinayaka.
14b-15a. The sins, earned (i.e. committed) during hundreds ofcrores of existences of that son who drinks (i.e. sips) the water of (i.e. flowing from) the lotus-like feet of his parents, perish.
15b-16a. He is blessed in the human world, he is purified from all sins. (Such) a man obtains the status of Vinayaka in (i.e. after) one existence only. [Srishti Khanda Chapter 50]
So, by following above ways, one can become the leader of Ganas and the remover of the obstacles.