When I defacate the first few movements feel like I'm defacating glass but then afterwards for the next few the pain goes away. I am a male. 22.?

Fissure. A rectal fissure often cause some pain, often without bleeding. Hemorrhoids can also cause pain. A rectal exam with an anoscope can diagnose your problem. A full colonscopy might be needed if your pain is due to an inflammatory lesion.
Possible hemorrhoids. Painful bowel movements are commonly caused by hemorrhoids. Make sure you are eating enough fiber, or start taking a fiber supplement like metamucil. It is a good idea to see your primary care doctor for an exam to see if hemorrhoids are in fact the cause of your pain. Good luck.