Once the codes are removed you cannot restore them easily but you can try the following steps:
https://support.clarivate.com/Endnote/s/article/EndNote-Word-document-with-removed-field-codes?language=en_US