What Yahya (Peace be upon him) was truly commanded with – Tawheed, of course.
Imam Ahmad narrated that Al-Harith Al-Ash`ari said that the Prophet of Allah said,
(Allah commanded Yahya bin Zakariya to implement five commands and to order the Children of Israel to implement them, but Yahya was slow in carrying out these commands. `Isa said to Yahya, `You were ordered to implement five commands and to order the Children of Israel to implement them. So either order, or I will do it.’ Yahya said, ‘My brother! I fear that if you do it before me, I will be punished or the earth will be shaken under my feet.’ Hence, Yahya bin Zakariya called the Children of Israel to Bayt Al-Maqdis (Jerusalem), until they filled the Masjid. He sat on the balcony, thanked Allah and praised him and then said, `Allah ordered me to implement five commandments and that I should order you to adhere to them.
The first is that you worship Allah alone and not associate any with Him. The example of this command is the example of a man who bought a servant from his money with paper or gold. The servant started to work for the master, but was paying the profits to another person. Who among you would like his servant to do that Allah created you and sustains you. Therefore, worship Him alone and do not associate anything with Him.
I also command you to pray, for Allah directs His Face towards His servant’s face, as long as the servant does not turn away. So when you pray, do not turn your heads to and fro.
I also command you to fast. The example of it is the example of a man in a group of men and he has some musk wrapped in a piece of cloth, and consequently, all of the group smells the scent of the wrapped musk. Verily, the odor of the mouth of a fasting person is better before Allah than the scent of musk.
I also command you to give charity. The example of this is the example of a man who was captured by the enemy. They tied his hands to his neck and brought him forth to cut off his neck. He said to them, ‘Can I pay a ransom for myself’ He kept ransoming himself with small and large amounts until he liberated himself.
I also command you to always remember Allah. The example of this deed is that of a man who the enemy is tirelessly pursuing. He takes refuge in a fortified fort. When the servant remembers Allah, he will be resorting to the best refuge from Satan.)
Al-Harith then narrated that the Messenger of Allah said,
(And I order you with five commandments that Allah has ordered me. Stick to the Jama`ah (community of the faithful), listen and obey (your leaders) and perform Hijrah (migration) and Jihad for the sake of Allah. Whoever abandons the Jama`ah, even the distance of a hand span, will have removed the tie of Islam from his neck, unless he returns. Whoever uses the slogans of Jahiliyah (the pre-Islamic period of ignorance) he will be among those kneeling in Jahannam (Hellfire).) They said, “O Messenger of Allah! Even if he prays and fasts” He said, (Even if he prays, fasts and claims to be Muslim. So call the Muslims with their names that Allah has called them: `The Muslims, the believing servants of Allah.’)
This is a Hasan Hadith, and it contains the statement, “Allah has created and sustains you, so worship Him and do not associate anything with Him in worship.” This statement is relevant in the Ayat (2:21-22) we are discussing here and supports singling Allah in worship, without partners.
Source: Tafsir Ibn Kathir, Volume 1