An ideal lens for astrophotography is a fast, wide-angle lens. It will be characterized by three important criteria:
Lower f-stop number
Low focal length number (wide-angle)
Prime Vs Zoom lens.
Typically f-stop 2.8 or lower is ideal for astros. Lens cost tend to increase significantly as the f-number gets below 2.8, also lens aberrations increases as well. I find that a lens with an f-number of 1.4 is great, as you tend to “stop down” to f 2.0 or f2.8 and this reduces any lens aberrations (coma, vignette) when shooting wide open with a f2.8 lens.
You will also need a wide angle lens in order to capture a significant portion of the enormous night sky. The general rule for focal lengths is to use 20mm and below for a micro four-thirds, 24 mm and below for an APSC or crop and 35 mm and below for a full-frame sensor camera. There are a lot more choices for lens brand and the most popular brands for astros are Sony, Rokinon, Canon, Nikon, Sigma, Tokina, Laowa and Tamron. Rokinon, a third party lens maker offers some of the best balance of cost-performance benefits for astrophotography.
Prime lenses are fixed focal length lenses and tend to be sharper compared to zoom lenses. Zoom lenses offers compositional flexibility compared to prime lenses. Lens filter mounting options is also another parameter to consider when committing to a lens.
I have about 4-5 different lenses for astrophotography, a few of my favorite lenses are Rokinon 14mm f2.8, Rokinon 8mm f3.5 fisheye, Sony FE 2.8/12-24 GM, Sony FE1.4/24 GM, SigmaArt 20mm f1.4 and Sigma Art 35mm f1.4. Generally, glass technology progresses at a slower pace compared to camera sensor technology and I always counsel people that if there is one area where you want to spend your dollars that would be on your lens.