No, they don't prevent people from buying drugs online but they sure make it less safe and more filled with bad actors by interfering with the reputational nature of them.
Which just harms consumers, who will anyway use the same method to get them. Nobody wins, state police just has some extra semi-meaningless jobs and prisons are a bit more full