I followed this QA link to left-align the equation and this to prefer using \hspace instead of \hskip:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,mathtools}
\usepackage[algosection, ruled, lined]{algorithm2e}
\usepackage{etoolbox,setspace}
\makeatletter
\newenvironment{shiftedflalign*}{%
\start@align\tw@\st@rredtrue\m@ne
\hspace{-7pt}
}{%
\endalign
}
\makeatother
\begin{document}
\begin{algorithm}
$c\coloneqq 0$
\begin{shiftedflalign}
1+1=2 &&
\end{shiftedflalign}
\begin{shiftedflalign}
1+1=2 &&\
1+1=2
\end{shiftedflalign}
\Return{$(x,y,z)$}
\caption{removemarked()}
\label{alg:removemarked}
\end{algorithm}
\end{document}
The rendered pdf where the linebreak seems to make the \hspace{-7pt} working for the 1+1=2 && fail:

Other methods I have tried but also failed:
alignatwith all left-aligned\setlength{\mathindent}{0pt}
Q: How to tune the multiline equation with the self-defined indentation by something like flalign or others?
Edited:
To answer the Willie Wong's 2nd comment, the above tex is one example. My working tex code is to use many equations, so I use align here although I originally was to use the $$ mode. My purpose is to make these equations aligned to the rest context in the algorithm block, so I tried as the above shows.
Also as Willie Wong's 2nd comment says, the inline maths mode works for me.

\hspace{-7pt}in front of the first line of anflalign*. You can check that if you also (manually) put\hspace{-7pt}at the start of the second line, then it "works". This is not an issue if you have a positive hspace, because the first column is to be right-aligned by the line that has the "longest" first column, and 0 is less than other positive numbers. – Willie Wong Nov 17 '23 at 07:36\begin{flalign*}doesn't actually result in a flush-left output, and has a bit of space in front. This is specific to within\begin{algorithm}so something is adding an extra space/indent somewhere. – Willie Wong Nov 17 '23 at 07:48\newcommandto create one new line command with\hspace{-7pt}preceded is enough to meet the above feature request (I will test it later). Then is there one elegant way to make\hspace{-7pt}work for all lines with just one global setting if not using\newcommand? If not, it is also enough for me to mark this question solved. – An5Drama Nov 17 '23 at 08:01