I know that the DM can give you enchanted items, but can players spend gold and downtime to enchant their own?
The DMG has rules for this, at pp. 128-129, "Crafting Magic Items." You'll have to work with your GM to work out the details. In short, you can (with the GM's say-so) spend gold, spell slots, and time to create magic items; the rarer/more powerful the item, the harder to craft.