A child's inability to view a situation from any other perspective beside their own is known as

egocentrism. Egocentrism is the inability to understand or consider other people's perspectives, thoughts, or feelings. This cognitive limitation is commonly observed during the early stages of child development.