Addendum added to respond to the comment/question of X0-user-0X.
A case can be made that this response is not on point, because I have not attempted to critique your specific approach.
I would opt for a simpler approach. Given that the outlawed sequence is (1,0,1), I would define the following $3$ variables:
$s(n,1)$ denotes the number of all satisfying sequences of length $n$, whose rightmost digit is $(1).$
$s(n,0)$ denotes the number of all satisfying sequences of length $n$, whose rightmost digit is $(0).$
$s(n)$ denotes the number of all satisfying sequences of length $n$.
This yields the following formulas:
$s(n) = s(n,1) + s(n,0).$
$s(n,0) = s(n-1).$
The idea here is that when constructing a satisfying sequence of length $(n)$, that ends in $(0)$, all satisfying sequences of length $(n-1)$ may be extended.
$s(n,1) = s(n-1,1) + [s(n-1,0) - s(n-2,1)].$
The idea is that when constructing a satisfying sequence of length $(n)$, that ends in $(1)$, all satisfying sequences of length $(n-1)$ that end in $(1)$ can be extended.
Further, those satisfying sequences of length $(n-1)$ that end in $(0)$ can also be extended, unless the sequence of length $(n-1)$ specifically ends in $(1,0)$.
Note that the number of satisfying sequences of length $(n-1)$ that end in $(1,0)$, is exactly equal to the number of satisfying sequences of length $(n-2)$ that end in $(1)$.
This explains the $[s(n-1,0) - s(n-2,1)]$ expression.
Therefore, $s(n,1) = s(n-1) - s(n-2,1).$
Putting this all together:
$$s(n) = 2s(n-1) - s(n-2,1).$$
$$s(n-2,1) = s(n-2) - s(n-2,0) = s(n-2) - s(n-3).$$
Therefore,
$$s(n) = 2s(n-1) - [s(n-2) - s(n-3)]$$
$$= 2s(n-1) - s(n-2) + s(n-3). \tag1 $$
(1) above is the exact same intermediate formula alternatively derived in Mateo's answer. Mateo's answer then used this intermediate formula to derive the formula in the comment of Daniel Mathias.
Addendum
Responding to the comment/question of X0-user-0X.
But can you tell me where i am wrong (in my answer)?
This is a very fair question. I had trouble analyzing your posting, because I was not sure what your variables represented. So, in order to attempt to spot your mistake, I will have to guess at what you are saying.
In analyzing your posting, I will need to express your ideas in terms of the variables/syntax used in my answer.
That is:
$s(n,1)$ denotes the number of all satisfying sequences of length $n$, whose rightmost digit is $(1).$
$s(n,0)$ denotes the number of all satisfying sequences of length $n$, whose rightmost digit is $(0).$
$s(n)$ denotes the number of all satisfying sequences of length $n$.
So, I will take a guess at where I think that you made your first mistake. Since I am guessing, I may be mistaken. If so, leave an additional comment following my answer, and I will dive deeper into your analysis. It will help me analyze your work if we $\color{red}{\text{both adopt the syntax/variables that I use in my answer}}.$
Since my critique is guess-work, I will stop, once I find what appears to be your first mistake. Then, I will ask you to consider whether my response in the Addendum + my original answer resolves your question.
If not, please leave an additional comment/question, and I will dive deeper into your question.
Let write $s_{n}$ all the correct sequence of length $n$.
So $s_{n}=s_{n-1}0 + s_{n-1, valid}1$ that means the total number of valid sequences of length $n$ equal the total number of valid sequences length $n-1$ that end with a zero + the total number of valid sequences length $n-1$ that end with a 1.
No matter what is the valid sequence of length $n-1$ if we add a zero at the end our sequence is still valid. The difficulty is concerning: $s_{n-1, valid}1$. Indeed if $s_{n-1}$ is a valid sequence of length $n-1$ that end with $10$ if we add a $1$ at the end to it we get the forbidden sequence.
I am confused by what the following equation is asserting:
$$s_{n}=s_{n-1}0 + s_{n-1, valid}1 \tag2 $$
The first portion of the above excerpt seems to indicate that you are using the syntax $s_{n-1}0$ to represent $s(n-1,0)$.
The second portion of the above excerpt seems to indicate that you are using the syntax $s_{n-1}0$ to represent $s(n,0)$.
This needs to be nailed down. If you are using $s_{n-1}0$ to represent $s(n-1,0)$, then this is wrong, because then the equation at the start of your excerpt becomes
$$s(n) = s(n-1,0) + s(n-1,1),$$
when it should instead be
$$s(n) = s(n,0) + s(n,1).$$
If I have not resolved your question, then, before proceeding further, please overhaul/edit your posting to adopt my syntax. Then, after you leave the additional comment following my answer, it will be easier for me to dive more deeply into your posting.