How to detect key presses (new programmer)

Godot Version

v4.7.2-stable

Question

Ok so i am brand new to Godot, like i have never made a game before, and I'm wondering how to detect key presses for a characterbody2d. please help

I recommend doing the first introduction course for Godot.