The question presumes that the Jewish religious legalists didn’t try to put Jesus to death. They did, try.
When He, coming to Nazareth, read from the book of Isaiah, and told them things that indicated that He was the Messiah while standing before them in the synagogue, the Jewish religious leaders tried to kill Him. The Scripture says:
“And all they in the synagogue, when they heard these things, were filled with wrath, and rose up, and thrust him out of the city, and led him unto the brow of the hill whereon their city was built, that they might cast him down headlong. But he passing through the midst of them went his way…” (Luke. 4:28-30).
They couldn’t kill Jesus. It was impossible for anyone or anything to take His life. It wasn’t yet His time to die, and when the time came, Jesus chose His time of death. He laid down His life on the cross at Calvary, so that the lost could be saved from sin.
Stephen’s death was just as illegal as Christ’s would have been, had the Jewish leaders had their way after Jesus taught in the synagogue. Roman law had to be complied with in order to execute people during the era when both Jesus and Steven walked the land of Israel.