How to monetise Open Source (Open source softwares (OSS))

Open source softwares (OSS) are becoming more and more popular among developers. OSN is like a big code library where people can find and contribute to different projects for free. But even though it's free to use and work on, there's a big question: How can developers make money from it?