The Prophet ﷺ said, "By twenty-seven," meaning the congregational prayer.
حدثنا حماد حدثنا مالك عن نافع
أن النبي ﷺ قال بسبع وعشرين يعني صلاة الجميع
Its isnad is sahih, but this is an abridged version. Hammad bin Khalid perhaps forgot the exact wording, so he narrated what remained of it in his memory. It has previously appeared via the route of Malik at 5332 and 5921 with the wording, "Prayer in congregation is worth twenty-seven times more than praying alone."