Card game from Godot 3 to 4 not working

Godot Version

I´m new to godot and ive been following this tutorial By “Adventures in Godot”
and although I have renamed some old methods into the new ones but I still found more errors. Point being is, I don´t understand how to fix this error:

extends MarginContainer

@onready var CardDatabase = load("res://Cards/")
@onready var CardDatabaseTemp =
var Cardname = 'Mentor'
var CardInfo = CardDatabaseTemp.DATA[CardDatabaseTemp.get(Cardname)]
var CardImg = str("res://Assets/Cards/",CardInfo[0][0],"/",Cardname,".png")

Line 6 gives me an error that says “Invalid get index ‘DATA’ (on base: ‘Nil’).”
Why does this happen?

I think this should have a function call not just .new

Base nil means your variable wasn’t instantiated.