This is a demo how I fixed my loosed window locking handle with 3d printed part
Step 1: Remove Your Window Locking Handle
Remove your loosed locking handle from the window. There should be a locking pin that wore out depending on how often you open the window.
This is a demo of fixing my Truth brand locking handle (Truth brand https://www.truth.com/products/Hinged-Window-Hard....Yours can be different but the design should be similar. Just get the right shape and size of the locking pin
Step 2: Print New Pin and Replace the Old One
Print the new pin according to your measurement and put it back in to the handle. Now it will work like brand new