Newbie having issues with 2d animation script

Godot version 4.3

I keep having the same issues with the latest part of my script. I am new and have basically zero experience in coding and am currently following a tutorial but even with it I am having issues with my animations. Here is the code I have written so far.

extends CharacterBody2D
@onready var sprite_2d: AnimatedSprite2D = $CharacterBody2D/CollisionShape2D/Sprite2D

const GRAVITY = 1000

enum State {Idle, Run }

var current_state

func _ready():
current_state = State.Idle

func _physics_process(delta):
player_falling(delta)
player_idle(delta)
player_run(delta)

move_and_slide()

player_animations()

func player_falling(delta):
if is_on_floor():
velocity.y += GRAVITY * delta

func player_idle(delta):
if is_on_floor():
current_state = State.Idle

func player_run(delta):
var direction = input.get_axis(“move_left”, “move_right”)

if direction:
	velocity.x = direction + 300
else:
	velocity.x = move_toward(velocity.x, 0, 300)

func player_animations():
if current_state == State.Idle:
AnimatedSprite2D.play(“idle”)
elif current_state == State.Run:
AnimatedSprite2D.play(“run”)

The main issue is this one right here /\ Func player_animations.

I keep getting errors that line 40, 45,46,47 are in some way not indented properly and then it creates a bigger mess everytime I try and fix it. Any idea on how to resolve it?

There a couple of issue which I see:
@onready var sprite_2d: AnimatedSprite2D = $CharacterBody2D/CollisionShape2D/Sprite2D - your node here is named Sprite2D, double check if its just a sprite or an AnimatedSprite2D, one is static while the other can store animation frames, make sure the node is actually AnimatedSprite2D

Here:
AnimatedSprite2D.play(“idle”) - you are trying to call play on basically a node type, instead of this use: sprite_2d.play("idle) - and make sure you have an animation named “idle” the same goes for “run”

Everything else looks +/- ok. Also edit the code section in the post as it has different fonts, makes it hard to read