This will vary depending on where you live and the amount of time you are willing to devote to it.
If you live in an area that is heavily wooded and are able to source and cut your own firewood, a cord wood stove will generally be the most cost effective
27 or so years ago when I wrote a research paper in college, there was good evidence that cord wood was cheaper even if you bought the wood. Natural gas prices are significantly lower now than they were then. I’m not sure if the same argument could be made.
Nearly any fuel choice has trade offs. Cord wood is simple and very effective as fuel in a modern appliance, but requires effort to obtain, prepare, store, and transport. In exchange for this effort, you receive an ineffably comforting warmth when this fuel is properly burned in a good appliance or masonry heater.
Pellet fuels increase the convenience of heating with solid fuel, but pellet appliances vary greatly in maintenance requirements and reliability. Depending on your locale, pellets maybe difficult to obtain at a reasonable price. Most pellet appliances require a source of electricity to operate, so additional products are required to keep them operating during a power outage.
Natural Gas is likely the most convenient fuel for a fireplace appliance, and there are many quality gas inserts available. Gas appliances cannot produce as much heat per hour as a typical wood stove, but can provide a more constant heat for longer periods of time. Gas prices have been pretty favorable for along time, but are subject to variations in the market.
I’m a big fan of traditional cordwood as fuel for quality solid fuel appliances.
It’s important that any hearth appliance be installed by someone who knows what they are doing. A fireplace insert of any fuel type will require an insulated liner to downsize the fireplace flue. The fireplace and chimney system should be thoroughly inspected before installing the insert.
For more information go here