That is only a beginning (a way you can refer to an element). As I have wrote in the first reply we do not have a full example. I can’t create one for you but I can help you to accomplish the goal.
What’s missing is replacing the header name with a value from the prompt. You already have a new name and a column header index (from the hook) so you only need to update the headers via updateSettings
method.