The following code is derived from egreg's answer in Centering an Arabic Section Number Above Justified Title Text
\documentclass{book}
\usepackage{titlesec}
\titleformat{\section}[display]
{\sffamily\Large\bfseries}
{\filcenter\thesection}
{1.25ex}
{\justifycenter}
\newcommand{\justifycenter}[1]{%
\leftskip=0pt plus 1fil
\rightskip=0pt plus -1fil
\parfillskip=0pt plus 2fil
#1%
}
\renewcommand{\thesection}{\arabic{section}}
\begin{document}
\large
\thispagestyle{empty}
\tableofcontents
\vspace*{25pt}
\section{Here is a Section Title on Which Centers the Number Above the Title Text and Justifies the Text as Well. However, I Do Not Want the Section Entry to be Entered into the TOC Automatically. How May I Turn It Off?}
\addcontentsline{toc}{section}{1. }
\end{document}
which produces the output:
As far as I can tell, titlesec is automatically producing a section entry in the TOC.
QUESTION: How may I turn this off, so that such entries are manually produced, with, say, \addcontentsline{toc}{section}{1. }? I compile the code with lualatex.
Thank you.


\section[Short title]{Very long title}. – Alan Munn Jul 23 '22 at 14:46\breakcommand in the title, this unfortunately, carries over to the TOC, which I don't want for aesthetic reasons. – DDS Jul 23 '22 at 16:36\section[Short title]{Very long title}---this seems to allow me to accomplish what I want. – DDS Jul 23 '22 at 16:41