“Sāriputta, there are these four kinds of generation. What are the four? Egg-born generation, womb-born generation, moisture-born generation, and spontaneous generation.
“What is egg-born generation? There are these beings born by breaking out of the shell of an egg; this is called egg-born generation. What is womb-born generation? There are these beings born by breaking out from the caul; this is called womb-born generation. What is moisture-born generation? There are these beings born in a rotten fish, in a rotten corpse, in rotten porridge, in a cesspit, or in a sewer; this is called moisture-born generation. What is spontaneous generation? There are gods and denizens of hell and certain human beings and some beings in the lower worlds; this is called spontaneous generation. These are the four kinds of generation."
This is really more of a commentarial topic. In the suttas even late texts like the Petavatthu and Vimānavatthu (which are entirely about ghosts and devas) don’t specify of which particular rūpadhammas they are constituted (though they are both clearly material, as are all beings except those in the four arūpa realms).