Great! Now, you know how to change the recursion depth. However, we have mentioned that 0 is a special value. Why? It means that you don't set any limits. With this option, the query may run infinitely! This is very risky, but sometimes you may want to write a very deep recursion. In such queries, it is vital to include a termination check or you may have to restart the whole database! Take a look at a query without any recursion depth limit and with a proper termination check:
WITH Counter(PreviousValue) AS (
1 -- anchor member
PreviousValue + 1 -- recursive member
WHERE PreviousValue < 100000 -- termination check
FROM Counter -- invocation
OPTION (MAXRECURSION 0);
The above query will stop thanks to the termination check, but it won't be stopped by max recursion depth.