YouTube utilizes a combination of automated systems and user flagging to identify videos that might contain mature and inappropriate content. Restricted Mode uses these signals to filter out videos that have been identified as potentially not suitable for all audiences. YouTube takes into account various factors, such as age restrictions, metadata, title, description, and the context of the video, to determine whether it should be filtered. Even so, Restricted Mode is not a perfect tool, and some safe videos may get accidentally blocked.