Some Dr’s (surgeons) give their patients a printed sheet of post-procedure instructions to follow. This would be the ideal place to list things a little more specific than just ‘no sexual activity’, altho that term sounds like it would include masturbation. Once, before a sperm test for fertility, I was given a printed sheet that said very specifically ‘no sex or masturbation for 3 days prior to the test’ - that was pretty clear! So I think Dr’s should just give out a printed instruction sheet where they can list things very specifically so there’s no misunderstanding.
This seems like a question for your doctor, honestly. Your doctor knows the exact procedure done, and where the stricture was, etc.
Has all the swelling gone? Did they give you a time frame for when you could resume actual intercourse?
I couldn't find much that specified anything, and the aftercare instructions I found all said to to talk to your doc about sex as it depends on your specific case. (Sex, is of course, different than masturbation, as sex can introduce bacteria that masturbation doesn't put you at risk for. Not one thing I found mentioned masturbation, though some said the generic "sexual activity".)
https://med.virginia.edu/urology/for-patients-and-visitors/penile-urethral-reconstruction-at-uva/urethroplasty/
I had a doctor tell me once that you only get once chance to heal and recover correctly, which I remember now every time I'm recovering from something and I'm bored out of my mind.
Let us know what your doc says.