https://en.wikipedia.org/wiki/Maslow's_hierarchy_of_needs
In order to pursue intrinsic motivation higher up Maslow's hierarchy, Physiological needs must be met first. This means that if a human is struggling to meet their physiological needs, then they are unlikely to intrinsically pursue safety, belongingness, esteem, and self-actualization.
If a person does not feel safe in an environment, they will seek to find safety before they attempt to meet any higher level of survival, but the need for safety is not as important as basic physiological needs.