Even after the National Assembly has passed a Bill, it cannot come into force for at least four weeks. This is technically known as the Period of Intimidation* (National Assembly Guidance, Sections 9 and 10).
During this period, the Counsel General or the Attorney General can threaten to refer the legality of the Bill, or any provision of the Bill, to the Supreme Court. Or the Secretary of State for Wales may make an order prohibiting the Clerk of the Assembly from submitting the Bill for Royal Assent.
The UK Attorney General has now gone through with this threat over the Agricultural Sector (Wales) Bill which was passed last month. How dare the National Assembly pass bills that the UK Government doesn't like.
* Strangely, when I re-checked the references I found that it is called the Period of Intimation, not Intimidation. However the definition of what it's for is exactly the same.