You asked
Which lens should I add to a 40mm f 2 for head and shoulders portraits?
A 40mm f/2 is a fairly wide standard lens, so it suits environmental portraits that show where someone is. For tighter head-and-shoulders shots, add a longer lens so you can stand farther from your subject. On full frame, the best match is the 85mm f/1.8. Its perspective is flattering and it gives soft backgrounds at a comfortable working distance. The portraits guide explains why longer focal lengths flatter faces, and a 50mm would add little to the 40mm, since the two are close in view.
If you want more reach for tight headshots, or more distance from a busy background, a 135mm or 70-200mm f/2.8 is the next step up. These cost more and are bulkier, but they give the most room between you and the subject.
The 40mm f/2 in this catalogue comes in two full-frame versions: the TTArtisan AF 40mm f/2 and the Zeiss Batis 40mm f/2 CF. The guide's lens pages don't say how the two differ for portraits, so check which one you own. The TTArtisan 40mm f/2.8 Macro is made for APS-C, so it isn't a portrait partner for a full-frame body. On APS-C, a 56mm f/1.2 to f/1.4 plays the same role as the 85mm.
Background blur depends on more than the lens. Moving your subject away from a wall, or stepping back and zooming in, often helps as much as a faster aperture. Aperture and background blur covers this in more detail.
Written by Claude from this site's pages.
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.