The easiest way to start modding, usually, is to look into other mods that do something similar to what you want, then modify those mods to do exactly what you want. For instance, in Kobold Camp, there's this reaction that makes beds from leather:
[REACTION:PRODUCE_LEATHER_BEDDING]
[NAME:create leather bedding]
[BUILDING:FURRIER:NONE]
[REAGENT:A:1:SKIN_TANNED:NONE:NONE:NONE]
[PRODUCT:100:1:BED:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_DIMENSION:150]
[SKILL:LEATHERWORK]
You want a few things to change. Going through the reaction, first, you probably don't want it to be made at a Furrier, since you likely don't have such a building. Second, you want the reagent to be a metal bar, not a tanned hide. Third, you probably want it to use a metalworking skill, not Leather Working. Fourth, you probably want it to take fuel. So, how do we make these changes?
Well, let's next reference pre-existing reactions. First, the building. Change the second line in that reaction to be the same one as the one from any of the smelter reactions, and the reaction will be done in the smelter.
[REACTION:PRODUCE_LEATHER_BEDDING]
[NAME:create leather bedding]
[BUILDING:SMELTER:NONE]
[REAGENT:A:1:SKIN_TANNED:NONE:NONE:NONE]
[PRODUCT:100:1:BED:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_DIMENSION:150]
[SKILL:LEATHERWORK]
Second, reagent. Again, the smelter reaction file gives examples of what a reaction that takes a metal bar looks like, but we don't want this to take any metal bar, we want it to take a specific type of metal bar, let's say iron. So, we swap the reagent line here to the corresponding one from the Steel-making reaction. I also took the liberty of changing the reaction reference and name lines here, to make it clear that this is the reaction for an iron bed.
[REACTION:PRODUCE_IRON_BEDDING]
[NAME:create iron bed]
[BUILDING:SMELTER:NONE]
[REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:100:1:BED:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_DIMENSION:150]
[SKILL:LEATHERWORK]
Third, the skill. Not quite as easy, here, as there's no easy reference anywhere, but that's what the wiki is for. The
Skill Token page, specifically. It tells us that the token for the Blacksmith skill, used for making all metal furniture, is FORGE_FURNITURE. That's probably the appropriate skill here, too, so let's replace that LEATHERWORK.
[REACTION:PRODUCE_IRON_BEDDING]
[NAME:create iron bed]
[BUILDING:SMELTER:NONE]
[REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:100:1:BED:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_DIMENSION:150]
[SKILL:FORGE_FURNITURE]
Last, fuel. That's simple enough; just add [FUEL] to the end. Since it's at the smelter, we don't need anything special to make the game ignore the need for fuel at a magma workshop, so just add that, and we're done.
[REACTION:PRODUCE_IRON_BEDDING]
[NAME:create iron bed]
[BUILDING:SMELTER:NONE]
[REAGENT:A:150:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:100:1:BED:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_DIMENSION:150]
[SKILL:FORGE_FURNITURE]
[FUEL]
And there we go. Add that to a reaction file, add [PERMITTED_REACTION:PRODUCE_IRON_BEDDING] to your Dwarf entry, and then you'll be able to create iron beds at a smelter for 1 iron bar. You would need to make an additional reaction for each other material bed you want to make, but if you're just swapping metal types, that's relatively easy.
Just remember: it's a lot quicker and easier to get the raw structures right if you're cribbing most of your work from someone else who has already got it working! Useful premade raws are the main reason for a modder to look through major mod works, even if they don't ever intend to use the mod.