It is narrated from Sayyiduna Salamah bin Akwa’ (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) used to perform the Maghrib prayer at the time of sunset, when the upper edge of the sun would set.
Brief Explanation
(Commentary on Hadith 1242)
From this hadith, it is established that the Maghrib prayer should be performed immediately after sunset; this is indeed the initial time for the Maghrib prayer.