If you’re having problems with a gas dryer that only heats a short time then shuts off the flame, the first thing to do is to completely disconnect the vent from the dryer and run it again to see if the symptom changes. If it does, you know the problem is the vent, read this page for more info.
If the problem doesn’t change with the vent off or the burner never fires up at all, then the problem is inside the dryer. This page will help you troubleshoot the key components inside the dryer.
A common problem is the glow ignitor gets hot and turns orange, you hear a click, but no flame and then the ignitor goes out. This is almost always the gas valve coils, an inexpensive part that’s easy to change. Don’t mess around with just changing one of them, save yourself a headache and change out the set. You won’t be out a lot of shekels. Buy the set here.
If the dryer runs for a while, shuts off and then won’t even let you restart it for a while, this is usually a bad motor–the motor is overheating and its internal thermal overload is kicking it off. You should confirm this by measuring for 120v at the motor’s run start winding terminals.
If you need help making electrical measurements and using a multimeter (or if you don’t know what that is), read this page. You won’t fix much in the appliance world without a multimeter. You can buy a good quality, inexpensive meter here.