sorry I am new to the site.
while making my family tree I accidentally put the wrong name in.
how can I delete them?
Without more specific information we can only advise you generally.
If you created the record in Family Tree, you should be able to delete it. If the delete person option is not available, then you would need to set about removing the person as a spouse or as a child.
Here are some knowledge articles about how to make corrections:
We hope this helps you correct the errors in your tree.
We are very happy that you are now beginning to find your ancestors. We all make mistakes and then need to correct them. Don't apologize for being new - celebrate instead. You are going to have so much excitement as you discover your ancestors.
The answer that you have received above instructs on everything you can use to correct the problem. We would also like to let you know about the Help Center found when you open the question mark at the top of your FamilySearch screen. There are many articles which will help you along your way as more issues need to be resolved.
If you merely accidentally inputted an incorrect name, you can delete the first and last names by clicking on "Edit" , then entering the correct name(s). I would add a reason statement (like, "Name originally added as ------ in error"), then click on "Save", so the originally intended name / identity sticks.
If you have gone any further (by adding relationships, sources, etc.) it is best to follow the advise of MNutall.
Incidentally, I would urge you never to take my advice if you are changing another user's inputs. Somebody recently changed several, perfectly correct names I had inputted for individuals, because she was new to the site and got the generation she was working on totally confused! If you do find a name that someone else has inputted correctly, try to contact them to discuss their error, as you could seriously damage someone else's carefully researched work.
As MNutall suggests, provided no one else has worked on the individual, you can delete them from the system and start again from scratch. However, my method is an option, as long as other relationships will not be adversely affected, and it is just the name itself you have inputted incorrectly.