See my reply to this similar question: https://www.researchgate.net/post/How_can_I_generate_a_DOI_number_for_my_research_articles
But note that DOIs are just an option, you are not obliged to have a DOI for your paper.
By the way, what do mean by "publishing" at ResearchGate? Do you want to upload a paper published in a journal? Or do you really want to "publish" at RG? Note that RG is not a publisher - see my reply to https://www.researchgate.net/post/How_to_Submit_publication.
Borrowing from Rob Keller: The best and most easy way to create a DOI for a paper of a journal that don't assign DOI number or chapters of previously published books without a DOI etc. is Zenodo: https://zenodo.org/