This is an excellent example of how to create a program this will follow a moving target. The challenge for you is that it was written by former students of mine who were using EV3 robots. The concepts are the same, the programming app is slightly different. You will need to use this program as a model to create your own in the Spike Prime app.