No legislation will stop a terrorist or any other criminal for that matter. Consider how easy it is to build a drone from parts and ingredients for improvised explosives aren't that difficult to come across. Legislation making it difficult to buy cold medicine in the US didn't win the drug war it just shifted the problem of meth overdoses to fentanyl laced heroine.
Most legislation typically has one of two functions but may contain both as bills hang around and get amended. Fundamentally laws largely either punish people after the fact because they didn't conform or it punishes law abiding taxpayers before the fact so somebody can profit with a wink and a nod.