DOC is the file extension for the file format used by Word 97 to Word 2003.
Starting with Microsoft Office 2007, all MS Office programs, including Word, switched to an XML-based file format. The file extensions for files created by these newer versions have an X at the end, e.g., DOCX.
Word 2007 and newer can both save and open DOC files as well as DOCX files.
ODT is the file format for Open Document Text format applications, such as Apache OpenOffice and LibreOffice. According to Microsoft (https://support.microsoft.com/en-us/office/differences-between-the-opendocument-text-odt-format-and-the-word-docx-format-d9d51a92-56d1-4794-8b68-5efb57aebfdc):
OpenDocument (.odt) files are compatible with Word and open source applications like OpenOffice and LibreOffice, but you might see formatting differences and some Word features aren't available in .odt files. Word documents (.docx) are compatible with most applications.