Depending on the item’s rarity, a character must meet a minimum level to craft that item. Magical items that do not produce spells still require spellcasters to create the item (such as a +1 weapon).
This includes having and expending material components the spell requires.
A character must have the spell slots and be able to cast a spell that an item will produce in order to imbue an item with that magic. This can be something characters have developed in-game (with the DM’s approval) or an established formula from a reputable (or not) source. Characters need a formula that describes the construction of the item.