How to correctly Lerp Object's scale trough time

Hello community! I’m trying to code a Scaling animation in C# because I think it’s better for mobile gaming performance than using the animations/animator.

The problem is that it doesnt Lerp trough time. When the action is called the scale is automatically changed to the final scale with no increasing visual effect…

So how can I lerp the scale up a little bit with a visual increasing effect and then back to the initial scale of the object with a decreasing visual effect?

Here’s the last piece of code I was trying:

public class Goal : MonoBehaviour {

private Animation _animation;
private float ScalingFactor = 1.7f;
private float TimeScale = 0.5f;
private Vector3 InitialScale;
private Vector3 FinalScale;

public void Awake()
{
	_animation = GetComponent<Animation>();
}

public void Start()
{
	InitialScale = transform.localScale;
	FinalScale = new Vector3(InitialScale.x + ScalingFactor, 
	                         InitialScale.y + ScalingFactor,
	                         InitialScale.z);
}

public void OnTriggerEnter2D(Collider2D other)
{
	if(other.transform.tag == "Bullet")
	{
		Destroy(other);
		//_animation.Play();
		StartCoroutine("LerpUp");
		GameManager.Instance.AddPoints(1);
	}
}

IEnumerator LerpUp()
{
	transform.localScale = Vector3.Lerp(InitialScale, FinalScale, Time.deltaTime * TimeScale;
	yield break;
}	

}

unlike meat suggested, I prefer doing it in an IEnumerator, but you need to set it looping:

IEnumerator LerpUp(){
	float progress = 0;
	
	while(progress <= 1){
		transform.localScale = Vector3.Lerp(InitialScale, FinalScale, progress);
		progress += Time.deltaTime * TimeScale;
		yield return null;
	}
	transform.localScale = FinalScale;
	
}

I have a YouTube video about this - YouTube it only requires a few lines of code