The True Polymorph spell allows you to turn a creature into an object and if you concentrate on it for 1 hour it becomes permanent. The relevant text follows:
Choose one creature or non-magical object that you can see within range. You transform [...] the creature into an object [...].
Creature into Object. If you turn a creature into an object, it transforms along with whatever it is wearing and carrying into that form. The creature's statistics become those of the object...
Can polymorph be used to create magic items by polymorphing creatures into objects? Answers can have DM Fiat, but I would prefer a rules based answer or an answer by Jeremy Crawford or Sage Advice or some other 'official' source.