My oldes and currently on used world called "XD" presents a problem in which hostile monsters do not spawn automatically at night or in caves. Monsters like zobies, squeletons, creepers or spiders don't appear. As same as vindicators and pilllagers don't spawn nor invade villages. Spawners do work, but the game isn't able to spawn them naturally as it should, even when it presents all the conditions for the mobs to appear.
Thank you for your report!
We're actually already tracking this issue in MC-155289, so I resolved and linked this ticket as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.