@worldsendless
Dont know the genesis of that idea but its in most vampire lore.
This source seems to claim to know, I didnt read but looks like it answers your question: https://www.distractify.com/p/why-do-vampires-have-to-be-invited-in#:~:text=According%20to%20The%20Vampire%20Book,a%20vampire%20to%20be%20invited