Check out Luke Smith's video walkthrough on this very subject, alicehttps://youtu.be/Q4I_Ft-VLAg
I'm just learning to program, so I wouldn't know if it's the best way, but I configured my vim for Python according to this guide here:https://realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/#auto-complete
I'm still having a little trouble with the auto-indentation, but besides that it's working great as far as my capacities can judge.
I've used the same guide to configure vim and it's working good so far.
For other languages I usually look up a 'styleguide' on how to write the code and then edit my config according to that, vim is a lot of fun and I should have used it a lot sooner, I'm glad you're starting with it