Allah will judge between them on the Day of Resurrection; surely Allah is Witness over all things.” (al-Ḥajj 22:17).
When Allah sent His Messenger ﷺ, the majority of the followers (1) of those religions answered his call—first to him, and after him to his caliphs—willingly and by choice. He never compelled anyone to accept the faith. He only fought those who attacked and fought him; but whoever made peace with him or concluded a truce, he neither fought them (2) nor forced them to enter his religion. This was in obedience to the command of his Lord, exalted be He: “There is no compulsion in religion; right guidance has become distinct from error.” (al-Baqarah 2:256).
This is a negation understood as a prohibition, meaning: do not coerce anyone in matters of religion.
The verse was revealed about certain Companions whose children had adopted Judaism or Christianity (3) before the advent of Islam. When Islam arrived, the fathers embraced it and wanted to compel their children to do the same, so Allah—glorified be He—forbade them to do so until the children themselves chose to enter Islam (4).
The sound view is that the verse is general, applying to every unbeliever. This is evident according to those who allow the collection of jizyah from all disbelievers: they are not to be forced into the faith; rather, they must either embrace Islam or pay the jizyah—as maintained by the scholars of Iraq and of Medina, even though some of them exempt certain idol-worshippers.