iPhone 7 answers by itself after 1 ring

Solution 1:

Possibly a feature called Auto Call Answers may have gotten turned on.

1) Head to Settings > General > Accessibility > Call Audio Routing

2) Next tap on the Auto-Answer Calls option and turn it off.

If Auto Answer calls is already turned off, then try the following troubleshooting techniques.

1) Restart iPhone

2) Hard Reset iPhone

Both troubleshooting techniques above, should solve your problem, however if they do not then unfortunately you will have to Factory Reset your iPhone.