This is a customizable window and door stopper. Check out this video to see it in action: https://www.youtube.com/watch?v=YY2fhFp9Yd0
For doors the base can be made thicker and the stopper can be glued to the floor horizontally.
It can be glued to the sill below your window using Tesa Power Strips small (14 x 34 mm) or any other double sided tape. The tape surface size can be adjusted. Just enter the distance between your sill and the bottom of your window. You can even adjust the spring strength, but 2 is suitable for almost all windows. See the description of the parameters in the customizer for more information!
Start customizer: https://www.thingiverse.com/apps/customizer/run?thing_id=486134