I assume you mean to call this class’ on_ready function elsewhere. You must have a variable or function before using dot . methods.
Make sure to give more context, maybe link the video you are using, explain what you are trying to make and why you are stuck.
Seems like you are making a state machine? Maybe the video wants you call on_ready from the state machine, like current_state.on_ready(), such as this transition function
extends Node
class_name StateMachine
var current_state: State
func transition(new_state: State) -> void:
current_state.on_exit()
current_state = new_state
current_state.on_ready()