How does shard allocation effect indexing speed?

elastic shard, how does it improve the indexing?

if less shard then indexing is faster and if more shard then it decreases indexing rate in elastic

what is the basic rule?

each shard allocated single thread so it should be performed slower than the more shard since processing work faster if more threads involved.

pls clarify this.