You asked
Viltrox af 40mm f 2 5 air vs sony fe 40mm f 2 5 g?
Both lenses are 40mm f/2.5 primes for full-frame cameras, autofocus, and neither is stabilised. On paper they frame and expose the same, so the choice comes down to your camera mount and which page's details suit you.
The Sony FE 40mm f/2.5 G is made for Sony E mount only. The guide describes it as tiny and sharp, a good everyday lens for Sony's compact full-frame bodies. If you already shoot a Sony, this is the native choice.
The Viltrox AF 40mm f/2.5 Air covers Sony E, Nikon Z and L-Mount, and its page lists far more compatible cameras, including Nikon, Leica, Panasonic and Sigma bodies. If you own or might switch to one of those systems, it is the only one of the two that fits.
Neither lens is stabilised, so for dim light or moving subjects the guide's advice is to look at the aperture and sensor first. Both open to f/2.5, which gathers light the same way on either lens. On an APS-C body, both behave like about 60mm on full frame, and f/2.5 gives roughly the depth of field of f/3.8, as the crop factor rule explains.
Check the price section on each page for current prices, since prices change and the guide quotes them only as listed there.
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}.