Is there an convenient way to serialize references to prefabs for savegames?

Lets say i have an inventory where i store references to item prefabs and quantity. How can i serialize references to those item prefabs? I didn’t find a really convenient answer to this yet on the internet.

Personally I would just save a quantity with an id/name (int/string).

Personally, I’d serialize them as id strings, and then have an index (ScriptableObject, probably) that maps ids to prefabs.