EDIT: I tried the solutions by @Bernard and @egreg.

both the solutions work for multiline headings, that is to say that, the title is centered **and** all the lines of the titles are at the same distance from the counter `\thesection`, but not for shorter/normal headings.

I just added,

```
\section{}
\section{Intro}
\section{Intro intro}

```

to your respective `.tex` and it appears that 

* for @Bernard, there is indeed a centering of the void section `\section{}`, but the two others do not appear visually to be centered, because the text is so short compared to the multiline heading
* for @egreg, there is no centering of the void section, nor of the short section.

What is needed is exactly what happens now for multilined headings, but for normal headings as well, which means simple centering of the `number+title` for short headings.

====================== END OF EDIT ===================

I use the `article` class.

I have multi-line headings for my sections and I want the section number+title to be centered, but when the title has several lines, I want the second lines to begin at the point where the first line begins [after the number section].

I also want to avoid hyphenation in titles, so I was told that `\raggedright` was the solution.

I was told that `titlesec` could to do all this, but I failed to get what I want. I also have other commands to put into `\renewcommand\section{` which have nothing to do with style.
therefore I would like to avoid the use of `titlesec` and I do not mind to use directly `\renewcommand\section{`.

```
\documentclass{article}
\tracinglostchars=2

\setlength\parindent{0pt}
\newcommand*\x{\rule{1cm}{1cm}}

%\usepackage{titlesec}
%\usepackage[extramarks]{titleps}
%\titleformat{\section}{\raggedright}{\textsc{\thesection}}{1em}{\normalfont}
\makeatletter
    \def\@seccntformat#1{\rmfamily\bfseries\upshape\llap{\csname the#1\endcsname\hspace{0.11em}Q8Q\hspace{0.11em}}\normalfont}

    \renewcommand\section{%
    %\clearpage
    % other code...
    %\penalty-9999
    \@startsection {section}{1}{0em}{0\parskip}{10em}{\centering\rmfamily\bfseries\scshape}%
    }

\makeatother
\begin{document}
\section{fontspec warning: "only-luatex-feature" Ignored LuaTeX only feature: 'Renderer=Full/Basic'.
fontspec warning: "only-luatex-feature" Ignored LuaTeX only feature: 'Renderer=Full/Basic'.
fontspec warning: "only-luatex-feature" Ignored LuaTeX only feature: 'Renderer=Full/Basic'.
fontspec warning: "only-luatex-feature" Ignored LuaTeX only feature: 'Renderer=Full/Basic'.
}

\end{document}

```

currently, it is centered, but, I cannot manage to have centered, plus `\raggedright` plus ''beginning of the second line at the beginning of the first one'' simultaneously.