When it comes to portraits, two major factors determine how good a lens is for many photographers and they are focal length and aperture. Generally speaking, many photographers prefer to have a relatively long focal length with a wide aperture as this helps with both the framing of the shot and also the kind of background blur you can achieve.
In a recent video, photographer and YouTuber Matt Granger compares three lenses to demonstrate the kind of results you can expect. The lenses he compares are the Nikon 85mm f/1.4G, the 105mm f/1.4E and the 70-200mm f/2.8E. These lenses are not the most budget-friendly lenses, however they all produce incredible quality especially when coupled with a high-resolution camera like the Nikon D850. Granger discusses how each focal length will help with controlling the perspective of the image. The longer focal lengths allow you to stand further away from your subject thus creating a "flatter" looking image. Of course, this is all subjective and there are plenty of photographers that prefer to shoot much closer to their subjects with a wider-angle lens. Granger does put the images from each lens side by side allowing you to decide which you prefer most.
Personally, I tend to prefer a longer focal length with a wide aperture as it can prevent any distractions in the background from appearing. Having said that, I do enjoy shooting with a wider focal length like a 50mm on occasions because a completely blurred out background may not have much context.
Check out the full video and let me know what you think is the best portrait lens.