Elasticsearch ILM Policy

Hello Every One

I have one elasticsearch cluster and Version is 7.10.2 I want to setup some of the index delete after week and after month automatically can you suggest how we can setup this cluster design is there are 6 date node 6 primary shard and 1 replica of each index now I want to setup ILM how can I achieve that

7.10 is EOL and you should upgrade to a supported version ASAP.

Have you seen ILM: Manage the index lifecycle | Elasticsearch Guide [8.3] | Elastic?