How do i make the camera point in the direction my character is moving?

IDK how to so yep.
CODE:

    if (Input.GetKey("s"))
    {
        rb.AddForce(0, 0, -10);
        if (cam.rotation.y == 0)
        {
            cam.Rotate(0, 180, 0);
        }
    }

    if (Input.GetKey("w"))
    {
        rb.AddForce(0, 0, 10);
        if (cam.rotation.y == 0)
        {
            cam.Rotate(0, 180, 0);
        }

    }

You can create a Scritp and attach it to the camera. The scritp must take the position of the character and use that Vector3 as the position of the camera. Sometimes you must add an offset because the camera is in the same place than the character.

If you want camera to face the player move direction and also follow the player then the easiest way (not necessarily the best) is to set the Camera has the child of the Player.

Just drag & drop the Camera GameObject on to the Player GameObject. Set the Camera’s Transform component position to 0,0,0 (or you can also set some offset if needed… like 0,2,0) and rotation to 0,0,0 (also here you can adjust some rotation if needed).

Now the camera position and rotation (+some) will “follow” the player transform automatically.