Help with servo motors and push button

Hello, I am a beginner at arduino and want to make a servo motor alternate between two specific positions using a push button, so that when I press the button the servo goes to position B, and if I press it again it goes back to position A.
How can I do that?
Thanks!

Start by looking at the examples in the servo library. Also look at the examples for digital IO to figure out how to make sure your button is working. Do each of these things separately and get it working.

Then, combine the two and get that working.

If you have trouble along the way, read the sticky post at the top of this forum about how to post your code and any output, along with what is not working vs. what you expect and people will help you.