You can read about the origin of those called “Samaritans” (in Jesus’ time) in 2 Kings 17:24-41.
Here are a few of the verses - but it’s better to read the whole passage.
*2 Kings 17:24 And the king of Assyria brought people from Babylon, Cuthah, Avva, Hamath, and Sephar-va’im, and placed them in the cities of Sama’ria instead of the people of Israel; and they took possession of Sama’ria, and dwelt in its cities.
2 Kings 17:27 Then the king of Assyria commanded, “Send there one of the priests whom you carried away thence; and let him go and dwell there, and teach them the law of the god of the land.” 17:28 So one of the priests whom they had carried away from Sama’ria came and dwelt in Bethel, and taught them how they should fear the LORD.
2 Kings 17:32 They also feared the LORD, and appointed from among themselves all sorts of people as priests of the high places, who sacrificed for them in the shrines of the high places. 17:33 So they feared the LORD but also served their own gods, after the manner of the nations from among whom they had been carried away. *
Nita