In Minecraft, as in other games, you can change the difficulty level. In Minecraft, you can choose from 4 difficulty levels: peaceful, easy, normal and hard. Each difficulty level offers a completely different gameplay experience, and can sometimes change it in part, for example, through difficulty-dependent effects.
Peaceful level of difficulty
Peaceful level is the easiest level available in the game. It is a very good choice for the youngest players, but it is also useful for special multiplayer modes.
The main distinguishing feature of this difficulty level is that it disables the spawning of aggressive mobs, and already existing monsters despawn. Neutral mobs will still appear, but they will not attack the player.
At the peacetime level, the hunger bar does not drop and life points regenerate spontaneously. The player also does not receive damage from TNT.
The disadvantage of this difficulty level is that it prevents you from getting some items from the monsters.
Easy difficulty level
The easy difficulty level allows for fairly peaceful gameplay, but unlike the peaceful level, it allows aggressive mobs to spawn. Although monsters will appear, they will not cause the player negative effects such as poisoning from cave spiders, but they will be able to wear some armor.
On the easy difficulty level, hunger decreases, but the level of life will not drop due to hunger below half.
Normal difficulty level
Normal difficulty is the default difficulty mode, which provides the most balanced gameplay. Hunger can cause health to drop to half heart, and zombies have a 50% chance of turning a villager into a zombie villager. In addition, zombies and skeletons can wear enchanted armor.
An element worth noting is that vindicators on this difficulty level can destroy wooden doors.
Hard difficulty level
On hard difficulty level, mobs deal more damage and can drop better items. The player can die of starvation, and zombies can destroy wooden doors and summon reinforcements if attacked. Spiders can spawn with the following effects: speed, strength, regeneration and invisibility. Villagers killed by zombies turn into zombie villagers. There is also a chance for pillagers to spawn near the player.
Local difficulty
Local difficulty is a difficulty level that counts, in addition to the global difficulty level, elements such as the time spent on the chunk, the total time spent in the world and the phases of the moon.
The total time spent on a chunk is counted based on the number of hours spent by all players on a given chunk. Hours are counted based on ticks. If two players are on a given chunk, the number of ticks is counted for each player, so the maximum number of 50 hours will be reached twice as fast.
The local difficulty level ranges from 0 to 6.75 depending on the global difficulty level. Where 0 is at the peaceful level, and 6.75 can only be achieved at the hard level.
Moon phases and difficulty level
The local difficulty depends, among other things, on the phases of the moon. The number by which the moon phase increases the difficulty level does not change depending on whether it is day or night. A new moon does not affect the difficulty level, while a full moon adds 1 to the difficulty level. Each moon phase changes the difficulty level by 0.25.
Sources:
https://minecraft.fandom.com/wiki/Difficulty