Section 1622 is nine words of principle: all contracts may be oral, except such as are specially required by statute to be in writing. It sets the default the other way round from how most people assume. A handshake deal, an agreement reached over the phone, an arrangement worked out in a group chat — none of these is invalid for want of a signed document. Writing is the exception, and it has to come from a statute.
The word "specially" matters. A contract does not fall outside this section because it is important, because it is worth a lot of money, or because it would obviously have been sensible to write it down. It falls outside only where a statute expressly requires writing for that kind of agreement. The main list is § 1624, the statute of frauds: agreements not to be performed within a year, promises to answer for another's debt, leases longer than a year and sales of real property, real estate agency and commission agreements, agreements not to be performed in the promisor's lifetime, assumptions of mortgage debt, and certain large non-consumer loan commitments. Other statutes add their own requirements for particular transactions.
What § 1622 gives with one hand it does not help with on the other: an oral contract is valid, and it is also considerably harder to prove. The dispute in these cases is almost never about validity; it is about what the terms were, and it is decided on messages, invoices, part performance, payments and the parties' conduct. Section 1698 then governs whether an oral agreement can change a written one. Whether a particular agreement had to be in writing, and what evidence would establish it, is worth checking with a lawyer.