Org-capture template expansion properties & prompt references

Hi, I am sorry if my question is dumb, but I am new to (doom) emacs, and I kind of struggle with elisp to be frank.

This snippet seems to do exactly what I am looking for, but if I copy it to my config, what I understand is a variable binding method let at the end of the code gets executed on startup prompting me for the variable’s value.

Can someone please show me how to modify the code so I can re-use it ?
Thanks for your time.

PS: I am also aware of the guidelines, and this reply is obviously an ask for help, and does not improve the conversation but I thought starting a new thread to reference this one was overkill and who knows it can help some other beginner like me in the future.

EDIT: Question moved to this thread.