All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
First of all, it should be noted that appointing a successor is one of the methods of appointing a ruler over the Muslims, as has been stated by the scholars, and there are conditions for it. Ibn Khaldoon quoted in his Muqaddimah (Introduction) that there is a consensus among the Muslim nation that choosing a successor is permissible. He mentioned the grounds for this consensus, that Abu Bakr had chosen ‘Umar, may Allah be pleased with him, to be a caliph after him, and ‘Umar, may Allah be pleased with him, had chosen six men to be his consulting members (the Shoora Committee). For more details, you may refer to the "Introduction" of Ibn Khaldoon.
Mu’aawiyah did not invent this matter; rather, prominent and honorable people preceded him in doing so, and he is not believed to have done so out of following his desires or because of favoritism, but it was due to the interest which he saw for the entire nation. So if he did the right thing, then he gets a double reward, and if he was wrong, then he gets one reward, as related in the hadeeth reported by Al-Bukhaari and Muslim.
Mu’aawiyah, may Allah be pleased with him, did not force the nation to pledge allegiance to Yazeed; rather, he consulted the prominent Muslims. Many Companions pledged allegiance to him, among whom was ‘Abdullah ibn ‘Umar, may Allah be pleased with him.
Shaykh Abdul Ghani Al-Maqdisi said, “His [Yazeed’s] Caliphate is valid; sixty Companions of the Prophet pledged allegiance to him, among whom was Ibn ‘Umar.”
Besides, it is confirmed in Saheeh Al-Bukhaari that Ibn ‘Umar, may Allah be pleased with him, pledged allegiance to Yazeed and then when there was dissent against him in Madeenah, Ibn ‘Umar gathered his family and warned them against supporting the removal of Yazeed from his position.
Naafi‘ narrated: “When the people of Madeenah ousted Yazeed ibn Mu‘aawiyah, Ibn ‘Umar gathered his household and children and said, ‘I heard the Prophet say, 'A flag will be fixed for every betrayer on the Day of Resurrection,' and we have given the oath of allegiance to this man (i.e. Yazeed) in accordance with the conditions enjoined by Allah and His Messenger, and I do not know of anything more treacherous than fighting a person who has been given the oath of allegiance in accordance with the conditions enjoined by Allah and His Messenger. If I ever learn that one of you has agreed to oust Yazeed or gave the oath of allegiance (to someone else), then that would be final separation between me and him.’”
Allah knows best.