Troubleshooting a grill with side burners that light but a main grill that doesn't begins with eliminating possible causes of non-lighting issues. Since the side burners are operational, the problem can't involve the fuel supply, a fuel valve or the main fuel line that runs between the propane tank and the grill's body. This means that a main burner that won't light is the result of some other problem with the ignition or fuel delivery system.
Ignition problems involve the electronic ignitors that produce sparks to light each burner on a grill. Separate burners can only be lit independently of one another if they each have their own fuel feeds. However, they may also have their own ignitors. A faulty ignitor in the main portion of your grill may prevent it from lighting, while fully functional ignitors in the side burners will let them operate normally. A main burner with a faulty ignitor should be easy to light with a match. If not, the problem is likely with the fuel feed for that specific burner.
If gas is flowing but can't reach your grill's main burners, the side burners may light without the main burner working at all. This can occur if the fuel feed lines, which branch off from the main fuel line, are blocked or ruptured. It can also happen if debris blocks the burner just below the grill grate. Drippings from previous cooking sessions, insect nests and debris from your yard can all block a grill's main burner fuel, preventing it from lighting until the blockage is removed.
A gas grill shouldn't pose a major danger even if one or more of its burners fail to light. Releasing the ignition knob when the burner isn't lit should stop the flow of gas. However, some types of leaks and problems may result in a release of flammable gas. If you smell gas, don't attempt to light the burner. Instead, turn the gas off and inspect the fuel tank, lines and burners once the smell of has has cleared. Always grill where you have adequate ventilation and perform all repairs only after the grill has fully cooled from use.