You most likely have some kinda of pelvic floor dysfunction that could be related to stress or inactivity. I have a tight pelvic floor and when i get too high i feel some pain and it leads to hard flaccid as well. Consistent exercising, stretching, healthier diet, and reverse kegels have helped me a good bit. To sum it all up; you probably have a tight, or weak pelvic floor.
i have the same exact issue Ive been smoking weed for years and i smoked some weed recently and after/during my urehtra began to become inflammed and it never went down i went to the doctor got std tested and uti checked and nothing showed up but the pain continued 24/7 i started taking antibiotics and the pain for the most part went away but then i smoked some weed and the pain is back 100% percent :((