An electronic apparatus and an operating method are provided. The electronic apparatus includes a storage, at least one sensor, and at least one processor configured to execute stored instructions to while the electronic apparatus is moving, capture a surrounding image by using the at least one sensor, when an unable-to-move situation occurs while the electronic apparatus is moving, generate context data including a surrounding image captured within a predetermined time from a time when the unable-to-move situation has occurred, store, in the storage, the generated context data corresponding to the unable-to-move situation having occurred, and learn the stored context data by using one or more data recognition models.