I disagree.Asking about laws would be legal advice im most people's views!I asked you which law you think it is.
You could ask me which law makes it illegal to speed on a road (that isn't a motorway). I would tell you that it's the Road Traffic Regulation Act 1984.
That isn't legal advice.
You could ask me which law makes it illegal to work on the gas parts of a gas appliance without being an RGI. I would tell you that it's the The Gas Safety (Installation and Use) Regulations 1998. There's a DIYnot sticky topic which tells you the same thing.
That isn't legal advice.
So, if you don't know which law makes it illegal to do what you think the OP did, then what [in the name of all that's holy] makes you think that it's illegal?