Make sure to do some tests right after purchase to ensure your lens works properly, so you can return it otherwise.
So, although the techniques I share below can also give you great results with a f/4 lens, I’d suggest that, if you want to get into Astrophotography, you get at least a f/2.8 lens. Also make sure that you purchase a lens that will give you sharp results even at its widest aperture. Prime lenses might often be your best choice, but there are also some zoom lenses that do a great job. Make sure to do some tests right after purchase to ensure your lens works properly, so you can return it otherwise.