A large, hard stool that's wider than the opening it has to pass through is a common cause of this exact stuck feeling, usually after a few days of holding stool in with too little fibre or water. The treatment your doctor started today is a reasonable first step to soften things and ease the passage.
Next Steps
Drink more water through the day, add fruits, vegetables and whole grains, and don't delay going whenever you feel the urge. Give the prescribed treatment two to three days to work before judging it.
Health Tips
Go back to your doctor sooner if you notice bleeding, develop severe pain, or still can't pass stool after a few days on treatment.