Simple door-stop with "sock". Scale and print the slanted part alone for a basic doorstop, or add the "sock" printed in a flexible plastic to prevent ...the doorstop from slipping.
The doorstop itself can be scaled in your slicer to fit any height of door. The doorstop works best when printed in a material that does not break too easily. ABS or HIPS are good choices as they are much less brittle than PLA.
To prevent it from slipping, use the ribbed side towards the carpet. If used on a smooth and slippery floor, print the "sock" in a soft material such as NinjaFlex, FilaFlexor PlastInk's Rubber.