You asked

How do I place my subject near a window to get flattering portrait light with a 45mm lens?

Place your subject a step or two back from a window, with the light falling on one side of the face. Turn them a little toward the window and expose for the face, not the bright glass. Direct sun is harsh, so an overcast window or open shade usually looks better. The Portraits guide covers this in more detail.

With a 45mm lens, you'll want to stand a comfortable distance away so the face keeps natural proportions. On full frame, 45mm gives a natural, slightly tight view. The site's three 45mm picks are:

For most window portraits, the Samyang is the sensible pick. Stop down to about f/2.8 if you photograph two people at different distances, so both stay sharp. For background separation, moving the subject away from the wall often helps more than a faster lens.

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