You can get and set any property of a node using its name. You can see its name when you hover over the property in the Inspector, or you can look at the API reference for that node, which has a list of its properties.
For example, to get the "Position" property:
print(position)
and to set it:
position = Vector2(100, 100)
If you want to access a property on another node, use .
notation:
$Sprite.texture = load("res://image.png")
I highly recommend reading the official tutorial, which shows much of this essential functionality:
https://docs.godotengine.org/en/stable/getting_started/step_by_step/index.html