Overview
minecraft:hide is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the entity run to a hiding spot it owns, or the closest one, and stay there. Villagers use it to hide during raids.
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:hide": {}
}