Need help with uploading files to godot nodes

In godot engine, how to transform images or other assests, from the assests folder to a sprite 2d or any other node, in a touch screen.

You use the Sprite2D.texture property to change textures at runtime.

Then use ResourcePreloader to get the Resource by path string at runtime and pass that to the texture property.

The preloader can load all resource types form your res:// directory.