No, laws can’t and don’t make people moral. Morality comes from God and is internal.
Laws can only work from the outside and they can’t even change a person, as the number of people who blatantly flaunt them demonstrate.
What they do is provide for justice and protection when those without morals engage in immoral activity. When done right, it provides for a peaceful and safe society.
Who needs "protection" from, say, a guy sitting in his den smoking a joint?