How to get values from flask to the HTML jinja template?

I am learning Flask and jinja and I was trying to send some basic data from flask to the jinja template. This is the code that I am using.

@config_page.route("/confirm", methods=["POST"])
def confirm():
    if not correct_condition:
        return render_template('settings/confirm.html', data='xyz' )
    return redirect(url_for('.config',form=request.form),code=307)

and a basic settings/confirm.html

<html>
 <head>
   <title></title>
 </head>
 <body>
    data : {{data}}
  </body>
</html>

But all I can see is just empty data

enter image description here

What is the wrong thing I am doing here? Any help would be welcome.