Facing issue with nested columns getting an error columns may be nested inside other columns

with col3:

    df = alerts_(select_mac_no)
    alert_raised = len(df)
    alert_unresolved = len(df[df['Alert status']=='Unresolved'])
    alert_resolved = len(df[df['Alert status']=='Resolved'])

 
    label_html = """
#     <p style='font-size: 20px; font-weight: 600; font-family:Source Serif Pro;margin-bottom: -30px; color: black;'>Alert Overview</p>
# """
    st.write(label_html, unsafe_allow_html=True)

    col1, col2, col3= st.columns(3)
            # Display cards in each column
    col1.markdown(cg.create_card_d("No of Raised Alerts","{}".format(alert_raised),"orange"), unsafe_allow_html=True)
    col2.markdown(cg.create_card_d("No of Resolved Alerts","{}".format(alert_resolved),"green"), unsafe_allow_html=True)
    col3.markdown(cg.create_card_d("No of Unresolved Alerts","{}".format(alert_unresolved),"red"), unsafe_allow_html=True)

the above is the code