Disable automatic index creation in elasticsearch

Per Index API | Elasticsearch Guide [8.11] | Elastic;

Automatic index creation is controlled by the action.auto_create_index setting. This setting defaults to true , which allows any index to be created automatically. You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns, or set it to false to disable automatic index creation entirely. Specify a comma-separated list of patterns you want to allow, or prefix each pattern with + or - to indicate whether it should be allowed or blocked. When a list is specified, the default behaviour is to disallow.

If you set that to false and saw errors, it'd be helpful if you posted your config and the log.