Vain
as it is used here, means,

Useless, worthless.
Also, false, evil, lying,
destructive.
But when ye pray, use not  vain repetitions,
as the heathen do: for they think that they shall be heard for their much speaking.  Be ye not therefore like unto them: for your Father knoweth what things
ye have need of,  before ye ask Him.


Matthew 6:7-8