FA for when length of $w$ is $4$ or $w$ contains the substring $01$
The easiest way to construct a deterministic automaton for such a language is to use the product construction:

Construct an automaton for all words of length $4$.
Construct an automaton for all words containing the substring $01$.
Use the product construction to construct an automaton for the union.

If you are allowed to use a nondeterministic automaton, then you can replace the product automaton with a &quot;union automaton&quot;, that is, add a new initial state and connect to the the initial states of the two automata with $\epsilon$ transitions.