From Sahih Bukhari (Hadith 1183):
Narrated `Abdullah Al-Muzani:The Prophet (ﷺ) said, "Pray before the Maghrib (compulsory) prayer." He (said it thrice) and in the third time, he said, "Whoever wants to offer it can do so." He said so because he did not like the people to take it as a tradition
Reference: Bukhari 1183