The Prophet (ﷺ) used to say the Maghrib prayer immediately after the sun had set when its upper side would disappear.

Sunan Abi Dawud Book 2, Hadith 27