I would like to underline one of the section title that appears at the center of the page, as shown in the figure:
I basically want to have an underline below one of the section (without altering the styling of the other sections) that is center aligned wrt to the section title. The length of the underline should be less than that of the section title as in the attached image. Is it possible to achieve this? Please note that I am using the following code snippet borrowed from here, to have a colored underline (I mentioned this to avoid conflict, if any, with the other packages that would be suggested in the answer) :
\documentclass[12pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[svgnames]{xcolor}
\usepackage{color,soul}
\setul{0.6mm}{0.2mm}
\setulcolor{red}
\usepackage{sectsty}
\sectionfont{\color{DarkBlue}\normalfont\fontsize{17}{18}\selectfont}
\begin{document}
\section*{\hfil Introduction \hfil}
This is the \ul{underlined} text.
\end{document}


\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Moreover, the answer on styling sectioning commands will depend heavily on the class/packages you use. – Rmano Mar 07 '21 at 17:34