I’m looking at text-editors/IDEs that give complete privacy to users and don't collect any data. I've heard that Vim collects no data whereas VS Code collects a lot of data.
What data does Vim collect?
Vim itself doesn't collect any data but some third-party plugins may do. Be particularly wary of AI-related ones.
So, ultimately, it is your responsibility to be mindful about your usage. Same for vi and all the old vi clones like nvi or elvis. I don't know about Neovim. The MacVim GUI may send crash reports but it never crashed on me in 14 years so I can't be 100% sure.
For other editors and IDEs, ask on more appropriate channels like r/programming.
Note that Vim is from an era when no such thing existed. If it is "privacy conscious" it is by accident, not by design. That disturbing trend is pretty new but that's what you get when you let megacorporations and wannabe-megacorporations design the tools you use and, frankly, there is nothing stopping the new maintainers from adding that crap little by little. So don't take that as a definitive "no".
me: "Alexa, should I worry about Vim collecting my data?"
Alexa: "You don't need to worry about Vim. I already uploaded all your sensitive data to do evil things with them. Would you like me to order some anti-depressants?"
Jokes aside, let's put things in perspective. Vim probably isn't your biggest privacy concern if you...
... and probably many more things.
Even on your own device, you may have background services that index your files for fast search results, backup your files to a cloud storage or train AI models with your documents. So some kind of data collection may already be taking place, even if you never start an editor.
As romainl has already pointed out, Vim is secure mainly through merit of age.
Vim is a text editor—and it's good at that—it's not a privacy safeguard. You can turn off some of the auxiliary files Vim creates with
:set nobackup nowritebackup noswapfile noundofile viminfofile=NONE
If you need to edit super-confidential data, you should not rely on Vim alone (or any text editor, for that matter) to keep it secure. Instead or additionally, take other precautions, like encrypting your data and running Vim in a sandboxed environment.