Elasticsearch shards size increase sometimes

If we say our data size is 20gb then primary shard is of 20gb and its replica shard is of 20gb then total index size is of 40gb.If i am using ilm policy for this then after 50gb it will create new index and average shard size is of 10 to 50gb which is optimal in my case