What is a wild animal attack? I don’t want to try it. So what happens in it?
From this (the?) Wiki:
If an animal has been trapped outside [...] with the barn or coop doors closed, there is a chance they will be attacked by a wild animal during the night.
After the player goes to sleep, any events that will happen during the night (such as Bundle events) are calculated as normal. If no events are due to occur, there will be a 50% chance that the game will attempt to start a wild animal attack event. If this event proceeds, the game will go through all buildings to find a barn or coop that has their doors closed and has animals left outside.
For each building, the game takes a random number between 0 and 1 and compares it to 1/(the number of total farm buildings). If the random number is larger, the building is ignored. In other words, the more buildings the player has, the less likely that one will be attacked. For example, if the player has two farm buildings, each building has a 50% chance of being attacked, three buildings would give 33%, four would give 25% chance of being attacked, etc.
Once a building has been chosen, the event takes the first animal stuck outside from that building to be the target of the attack. The animal will be removed from the game and in the morning, all other animals will have a mood message saying "<animal name> looks stressed and paranoid today. It seems like something bad happened last night." Besides this message, the other animals are unaffected.
Wild animal attacks have a chance to occur when a barn or coop animal is left outside overnight. This kills a random animal that was stuck outside. Other animals will show a message that they look stressed and paranoid, though this does not lower their friendship.
To avoid this, make sure your animals can get inside at night. Animals will try to go home automatically as long as the door is open. It helps to keep them fenced in- if they roam too far it is possible they can get lost or stuck.