In Acts, many who were into sorcery were converted. But Ex 22:18 and Lev 20:27 say that sorcers, etc. should be put to death. Are these passages in conflict?
I don’t seem them in conflict at all. The Old Testament texts make it clear that sorcery and witchcraft and occult practices are evil. The Israelites were to deal with this severely within the nation. They were also commanded to stone adulterers and disobedient children — even Sabbath-breakers. These forms of capital punishment were carried over to the church. At worst, we turn such folks over to Satan, after attempts at correction have been rejected (e.g. 1 Corinthians 5).
Those at Ephesus seem to have come out of a background and culture that dealt with the magic and the occult (see also Acts 16:16-18). The new believers did not seem to grasp the seriousness of the evil of such practices until the seven sons of Sceva were overcome. They then forsook their involvement in such practices.
The Old Testament texts agree with Acts 19 in that they all agree that occult practices are wrong. It took a dramatic incident to awaken the saints in Ephesus to the magnitude of this evil, at which time they forsook it.