Develop your own writing projects: you create products and sell licenses to them
The “write it, sell it” area is huge for freelancers of all stripes, not merely writers. It’s attractive, because you can work on projects which will earn for you for years. However, it’s also a risky area, because you may create something which just doesn’t sell.
Self-publishing is a popular option. You’re writing books, and selling them, but you retain all the rights.
Traditional, mainstream publishing is also an option. In this option, you “sell” your book to a publisher, but you retain all the rights. You sell licenses in the work, but these licenses are strictly limited, not only in specific rights, but also in licensing time. You avoid licensing all rights.