The error message you’re seeing means that your current DataStore, which was created as a Structured Content (Media) item, does not have content search enabled hence ContentSearchSpec may not be used for the data store in Structured Content (Media).
Structured Content (Media) DataStores are designed for storing and retrieving structured media like images, audio, or video. They are optimized for these types of files and may not have the indexing and search capabilities built-in for text-based content search.
Content Search is a feature that needs to be explicitly enabled on a DataStore. It allows you to index and search textual content within your data, which is not a primary function of a media-focused DataStore.