ContentDocument parentId

You need the LinkedEntityId on the ContentDocumentLink


Yes, the documents seem to be out of date?

There can be multiple entries for each ContentDocument. In the case of attachments (Lightning uses ContentDocument for attachments), there will be a record in the ContentDocumentLink for both the UserId and the record that is the Attachments Parent.

You can use a query similar to the below to find details of the attachments relating to an sObject. In this example a Case Id. *Note that the ContentDocumentLink object must be filtered with a where clause.

SELECT Id, LinkedEntityId, ContentDocumentId, Visibility, IsDeleted, ShareType,
ContentDocument.Title, ContentDocument.createdDate, ContentDocument.FileType
FROM ContentDocumentLink 
WHERE LinkedEntityId = '5000Y000999MQKTQA4'

enter image description here