Masturbation is not harmful and is actually very healthy for teenagers and older ones as well.
The reason you lost weight doesn’t lie in masturbation although some weakness could occur slightly after masturbation or if you do it more than once a week. If your weakness and weight loss
occurred suddenly, you need to report this to your parents and make an appointment with a doctor to have this checked. You could be having problems with something else like thyroid gland, or all sorts of other causes and by seeing a doctor you could manage your problem if there are any.