You're making the common beginner error of believing that "Lerp" is a tweening function, ie. that you can invoke Lerp once and it will act on an object over a period of time, moving it until it reaches a destination.
Lerp does not do anything like that at all. It's just a math function that accepts some numbers/vectors and returns a different number/vector. Note that you don't even pass it a reference to the thing that should be moved, so there's no way it could do what you're trying to use it to do.
If you want to move something with Lerp, you need to have a loop that runs every frame, calculates a new position for that one frame using Lerp, and moves the object to that position. Something like this:
// Start a coroutine the first frame this script is enabled:
IEnumerator Start() {
// Loop forever.
while (true) {
// Chain execution to the MoveTo coroutine, until it finishes.
yield return MoveTo(target.position, 3);
// Once it's done, chain execution to the MoveTo coroutine again,
// moving to the other target, until the coroutine finishes.
yield return MoveTo(target2.position, 3);
// Return to the top of the loop to move back to the first target.
}
}
// Move toward a destination point over a given time interval.
IEnumerator MoveTo(Vector2 destination, float duration) {
// Remember where we started from.
Vector2 start = transform.position;
// Control how fast we move.
float speed = 1f/duration;
// Loop until we progress from 0% all the way to 100%
// of our duration, storing the current progress in t.
for (float t = 0; t < 1; t += Time.deltaTime * speed) {
// Calculate a new in-between point for this frame, and move there.
transform.position = Vector2.Lerp(start, destination, t);
// Wait until next frame before resuming the loop.
yield return null;
}
// Finish exactly at the destination (the last loop execution
// ran when t was still slightly less than 100% of the way there).
transform.position = destination;
// No need to call StopCoroutine, we can just hit the end of the function.
}
Examples like this are everywhere - I've written several myself on this site alone. So please do a bit more research in future to make use of the wealth of Unity code examples that are out there. If you do, you'll find you're often able to fix your own problems, faster.