It's unlikely your files are stored as Attachments, that table is old and more fit to Salesforce Classic. You could try SELECT Body FROM Attachment WHERE ParentId = '006...'
but I'd expect 0 results.
Use the approach from my answer https://stackoverflow.com/a/74897406/313628 (I can't mark the question as duplicate because nobody upvoted it ;))
Your actual payload is hidden in ContentVersion table, VersionData field. It's a related list under ContentDocument but for your purposes probably fetching
SELECT ContentDocument.LatestPublishedVersion.VersionData
FROM ContentDocumentLink
WHERE LinkedEntityId = '006...'
is enough.
Now... what you will see in VersionData
depends on which API you are using. Over REST API the field will simply contain 1 more link you need to pull (HTTP GET) to get the raw binary/text payload. Over SOAP API it'll return and XML document with the payload as 1 of the fields, base64-encoded. https://stackoverflow.com/a/60284736/313628