3d shirt configurator issues( dynamic change in 3d model as changes in 2d template)

Hello guys, it seems that I’ve hit a dead end and cannot see myself going any further
I am making a t shirt configurator using threejs, I figured the part where I could change the color of the shirt using gradient panel but couldnt figure out the following features I wanted to add:

  1. Wanted to add a 2d template which supports drawing and drag n drop images onto the template which will get dynamically mapped onto the 3d model
    2.Input text as dynamic texture
    3.Applying this as texture without altering the color of the model i.e. if I changed the color for a shirt to red and wanted to add a iron man Image on the shirt, I would have a red shirt with an Iron man image which also has resize features

Use decals, or learn how to unwrap the UVs on the model to match your template, in Blender.

https://threejs.org/examples/webgl_decals.html

Can you please attach related resources to learn

https://www.reddit.com/r/blender/comments/vos9ov/can_someone_suggest_a_good_uv_unwrapping_tutorials/

Okay thanks for the help, I got the uv map But Im not undertanding hwo this will get mapped onto 3d model in threejs, I understood the concept of uv mapping but unable to fine a way to implement in threejs