5. Given that the domain of the function $f(x)$ is $\mathbf{R}$, and $f(x+2)-2$ is an odd function, $f(2 x+1)$ is an even function. If $f(1)=0$, then the value of $f(1)+f(2)+\cdots+f(2023)$ is
$f(x+2)-2$ is an odd function $\Leftrightarrow f(x+2)-2+f(-x+2)-2=0 \Leftrightarrow f(x+2)+f(-x+2)=4$ $\Leftrightarrow$ the graph of $f(x)$ is symmetric about the point $(2,2)$;
$f(2 x+1)$ is an even function $\Leftrightarrow f(2 x+1)=f(-2 x+1) \Leftrightarrow$ the graph of $f(x)$ is symmetric about the line $x=1$, then $f(x)$ is a periodic function with a period of 4.
In fact, $f(x)=f(1+(x-1))=f(1-(x-1))=f(-x+2)=4-f(x+2)$
$$
=4-f(1+(x+1))=4-f(1-(x+1))=4-f(-x)=f(x+4) \text {. }
$$

It is easy to calculate that $f(1)=0, f(2)=2, f(3)=4, f(4)=2 \Rightarrow f(1)+f(2)+f(3)+f(4)=8$,
so $f(1)+f(2)+\cdots+f(2023)=6+505 \times 8=4046$.