You asked

Canon ef 50mm f 1 8 ii vs canon ef 50mm f 1 8 stm?

The two lenses are nearly identical on paper. Both are 50mm f/1.8 primes for Canon EF mounts, neither is stabilised, both autofocus, and both frame the same: 50mm on full frame and about 80mm on APS-C. They fit the same list of Canon bodies, from the full-frame Canon EOS 5D Mark IV and Canon EOS 6D Mark II to the APS-C Canon EOS 80D and Canon EOS 90D.

The real difference is autofocus. The guide describes the Canon EF 50mm f/1.8 II as the old plastic nifty fifty with noisy autofocus. Its page doesn't say how the Canon EF 50mm f/1.8 STM sounds or focuses, so the guide can't confirm more than that. If quiet focusing matters to you, such as for video or quiet subjects, the STM is the one to look at. For still portraits, the II does the same job for less fuss.

Neither page gives a price in this answer, so the guide can't say which is cheaper. Check the price section on each lens page before you decide.

Whichever you choose, this is the lens to start with for people, food and low light. The guide's portrait lenses section explains why, and the aperture and depth of field section shows how an APS-C body changes the blur you get at f/1.8.

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}.