Best way to make camera follow player

Guys,

Whats the best way to make camera follow player??

This is what i did. But the problem is that the camera gets a bit lag

public class Camera_Follow_Player : MonoBehaviour
{
    public Rigidbody2D player_follow;
    public GameObject camera_serv;

    void Update()
    {
        camera_serv.transform.localPosition = new Vector3(player_follow.position.x, 2.42f, -2);
    }
}

Hi @Gumemura, below is your code edited to make it smoother:

public class Camera_Follow_Player : MonoBehaviour
{
	public Rigidbody2D player_follow;
	public GameObject camera_serv;
	public float timeSmoothing; // default to 1f
	
	void Update()
	{
		camera_serv.transform.localPosition = Vector3.Lerp (camera_serv.transform.localPosition, new Vector3(player_follow.position.x, 2.42f, -2), timeSmoothing );
	}
}