I am 15 and have been working out for a few months so I obviously want high testosterone levels to gain more muscle and strength. Does masturbating have an effect on testosterone levels? Would it help to not masturbate?
Masturbation is very unlikely to decrease testosterone levels. Semen is not the source of testosterone, and ejaculation will not cause testosterone levels to go down.
Although athletes were once advised to avoid sexual activities (including masturbation) immediately before athletic performances, studies have not found any scientific basis for this advice. So far as I know there have been no studies of the effects of abstinence throughout training, and probably there won't be because it would be difficult to find athletes who would agree to be abstinent for a prolonged time and no way to tell whether they really were.
All other things being equal, increased sexual activity (including masturbation) tends to increase testosterone levels.