Indeed. SCOTUS uses what are called balancing tests with varying degrees of scrutiny to determine if a law is unconstitutional. The degrees of scrutiny are based on the type of rights involved and types of people affected, in general.
The problem with the balancing tests is that they were invented from whole cloth and really just serve as a mechanism for determining when the government can say that plain language in the Constitution doesn't mean what it really means.
Lawfulness of orders extends to statutory law and even municipal ordinances, too. Enforcement of immigration laws is based on statutory requirements, and there are penalties for violating those statutes.
There are a couple of tools used to interpret the meaning of a constitutional or statutory provision, and legislative intent is, indeed, one of those tools. When legislators or, in the case of our Founding Fathers, debated legislation or the Constitution, there were records of what they intended the ultimate effects of those writings to achieve. That effect can be pretty informative for future generations to use when determining how far the actual wording can be bent. It's essentially using evidence of their debates to clarify ambiguities in the plain language.
Unfortunately, activist jurists like to obfuscate or even outright misrepresent evidence of intent when they interpret the Constitution or even statutes.
NYSRPA v. Bruen eliminates balancing test for 2A cases if the Arm unless it is "Dangerous AND Unusual"*. The opinion allows for reasonable regulations restricting time & place as well as keeping arms by felons & people who have been judge mentally incompetent by due process.
Unless the arm is a NFA item any purchase or transfer necessarily involves an arm that isn't Dangerous And Unusual; so balancing tests are unconstitutional in these cases. The 9th Circus in 2016 upheld CA's 10 working day waiting period using intermediate scrutiny. The Chief Judge wrote a concurring opinion which cited waiting periods are historical. I.E. CA has had them since 1923 and it was common in the 1800's for purchasers to wait while the arm was shipped to the retailer. The majority like other post McDonald appellate court opinions ignored Heller by misreading the "AND" as "OR". This misreading was either accidental or deliberate. It took until the 2021-2022 SCOTUS session before the wild card Chief Justice Roberts's wasn't needed for a favorable to the plaintiff(s) opinion. Therefore, the many appeals of circuit court opinions weren't granted cert because Justice Thomas wanted a case where he could get 4 other justices to support a opinion that was less ambiguous than Heller. Two problems with Chief Justice Roberts is he sticks his finger into public opinion winds and he abhors expansive opinions.
Some form of waiting periods that don't apply to all purchases may withstand review by SCOTUS.
* Dangerous And Unusual comes from Heller.