Originally posted by BruceBanner Stop Down would be a high aperture value (F22 is max on this lens) and Wide Open low value (F1.8 on this lens)
You've got it. Both extremes produce less sharpness that the apertures in the middle. The best sharpness on this lens, like many others, is at f5.6 - f8.
Here are some tests that will give you a better idea:
Pentax smc DA 50 mm f/1.8 review - Image resolution - LensTip.com https://www.ephotozine.com/article/pentax-smc-da-50mm-f-1-8-lens-review-20006
Don't take these as gospel (for one thing, there can be variations in copies of the lens, and also the tests might not have been done correctly), but they show a generally consistent pattern.
As you will see from the charts, with narrower apertures beyond f8, sharpness drops away gradually (due to an effect known as diffraction). But the lens is still plenty sharp at f11 - and that will generally give as much depth of field (DOF) as you could want (e.g. for a vista shot). The difference in DOF between f11 and f16 might not be great enough to outweigh the loss of sharpness (unless you are doing macro). But just try it a number of times and judge for yourself.
At the other end, the lens is adequately sharp in the centre wide open, for those times when you are shooting in very low light and/or you want a very thin DOF (to isolate the subject). Here's an example:
It's not terribly sharp, but I still like the effect and the colours.
For portraits, wide open might not give enough DOF anyway (e.g. the subject's eyes might be in focus, but the nose out of focus.) As a starting point, try somewhere between f.2.4 and f5.6 to get the combination of sufficient area in focus and sufficient subject isolation.
As Steve says, just get out and shoot, experiment and take notes.