You probably can replace it yourself, you’re just not legally allowed to. Gas lines can only legally be worked on by a gas fitter.
Yes, gas lines can only be worked on by a gas fitter
But surely it depends on what the definition of gas line is else everyone who has a bbq at home will be in the poo when replacing the hose between the lpg bottle and the burner or replacing the seal/gasket at the bottle side of the hose.
Sensibly, I’d suspect working on the low pressure side of one bbq or their automotive lpg system may not be so naughty but whatever one does, one should take care, learn best practice and show some sense about how they approach the work.
Best one doesn’t smoke while while faffing about with any flammable gas or fluid