\documentclass{article}
\usepackage{chemfig}
\def\0{\vphantom{C}}
\begin{document}
\chemfig[atom sep=2em, fixed length=true]{
-[@{op2,-0.2},0.25,,,draw=none]\0-[@{op1,-0.2}]CF_2|\0-CF_2|\0-[@{cl1,1.2}]\hphantom{I}-CF_2|\0-CF(-[6]O-[@{op3,-0.8}]CF_2|\0-[@{cl3,2.2}]CF(-[6]CF_3)-[,0.5,,,draw=none]-O-CF_2CF_2|\0-SO_3^{-}M^+)-[@{cl2,1.2}]
}
\polymerdelim[height=2pt, depth = 4pt, indice=\!n]{op1}{cl1}
\polymerdelim[delimiters ={[]}, height=3pt, depth=5pt, indice=\!x]{op2}{cl2}
\polymerdelim[height=2pt, depth = 4pt, indice=\!m]{op3}{cl3}
\end{document}

Edit
\documentclass{article}
\usepackage{chemfig}
\def\0{\vphantom{C}}
\begin{document}
\chemfig[atom sep=2em, fixed length=true]{
\0-[@{op2,-0.2},]CF(-[6]O-[@{op3,-0.8}]CF_2|\0-[@{cl3,2.2}]CF(-[6]CF_3)-[,0.5,,,draw=none]-O-CF_2CF_2|\0-SO_3^{-}M^+)-CF_2|\0-\hphantom{I}-[@{op1,-0.2}]CF_2|\0-CF_2|\0-[@{cl1,1.2}]\hphantom{I}-[@{cl2,1.2},0.3,,,draw=none]
}
\polymerdelim[height=2pt, depth = 4pt, indice=\!n]{op1}{cl1}
\polymerdelim[delimiters ={[]}, height=3pt, depth=5pt, indice=\!x]{op2}{cl2}
\polymerdelim[height=2pt, depth = 4pt, indice=\!m]{op3}{cl3}
\end{document}

\documentclass{...}\begin{document}...\end{document}. But as the Overleaf links show, there are various packages designed specifically for chemistry, so it would probably be best to try to use one of those packages to create your formula and then people can help you from there. Also the Overleaf documentation is not the full documentation for any of the packages it recommends. – Alan Munn Jan 21 '23 at 17:33\phantom{...}. For line 2, just copy everything up to the "CF" in the first line, where the second line starts, but omitting the\left(which would cause an error) and one "(", to adjust for the one starting line 2. For line 3, repeat the\phantomfrom line 2, then another `\phantom' starting with "(" and going on as far as necessary. There are undoubtedly other solutions, but a simple hack seems easiest here. – barbara beeton Jan 21 '23 at 17:48