You can do it manually using the API following the opensearch documentation in
https://opensearch.org/docs/latest/im-plugin/ism/index/. Index State Management (ISM) is a plugin that lets you automate periodic, administrative operations by triggering them based on changes in the index age, index size. This will allow you to, for example, set a policy that sends you a notification message when the index size reaches certain level.
Hope this helps!