At face value, looking at the translation, and even the Arabic, this Aayah seems problematic. In Surah Zukhruf, Aayah 81, Allah says, " قُلۡ إِن كَانَ لِلرَّحۡمَـٰنِ وَلَدٌ۬ فَأَنَا۟ أَوَّلُ ٱلۡعَـٰبِدِينَ " "Say (oh Muhammad), if the most Merciful (Allah) had taken a son, then I would be the first of his worshippers" This is usually how the Aayah is translated, which causes an issue. In order to understand this Aayah properly, it requires more of an understanding of the Arabic language in depth. The Prophet (Peace & Blessings upon him) is saying, أَنَا۟ أَوَّلُ ٱلۡعَـٰبِدِينَ. I am the FIRST of those who worship. That is a more correct translation.
'First', not in the sense of, first one to worship, but rather the best and most superior worshipper of those who worship Allah. Number 1 when it comes to worshipping. In other words, the Aayah is indirectly asking a rhetorical question, that, had Allah taken a son, would I not know about it? Of course I would. As I'm the best worshipper, I would have been the first to know, and I would be the best at it.
Now, a statement like that, claiming to be the best worshipper, seems to have immense pride within it. To say one is the best at something. Right? So again that causes another problem. Which is why Allah, at the beginning of the Aayah says, "قُلۡ". . . "Say (oh Muhammad) . . ." The Prophet (Peace & Blessings upon him) is commanded by Allah to say this Aayah and to make this statement. As the Messenger of Allah himself, would not say something like that. He was free from pride. Even though it is the truth. So Allah also protects the honour of the Messenger of Allah, freeing him from any pride.