An electronic device comprising: at least one processor; a first slot connected to the at least one processor and configured to receive a first subscriber identification module, SIM, (111, 531) which is detachable; a second slot selectively connectable to the at least one processor and configured to receive a second SIM (112, 541) which is detachable; an embedded SIM, eSIM, (201, 550) selectively connectable to the at least one processor and included in the electronic device; and a switch configured to connect one of the second slot or the eSIM (201, 550) to the at least one processor, wherein the at least one processor is configured to: detect a first event for temporarily using the eSIM (201, 550) while the at least one processor is connected to the second slot based on the switch being in a first state; based on detecting the first event, control the switch to change from the first state to a second state, wherein the at least one processor is connected to the eSIM (201, 550) based on the switch being in the second state, and wherein, the at least one processor is further configured to: perform, while the eSIM (201, 550) is connected to the at least one processor, an operation associated with the eSIM (201, 550); and control, based on performing the operation associated with the eSIM (201, 550), the switch to change from the second state to the first state. at least one processor; a first slot connected to the at least one processor and configured to receive a first subscriber identification module, SIM, (111, 531) which is detachable; a second slot selectively connectable to the at least one processor and configured to receive a second SIM (112, 541) which is detachable; an embedded SIM, eSIM, (201, 550) selectively connectable to the at least one processor and included in the electronic device; and a switch configured to connect one of the second slot or the eSIM (201, 550) to the at least one processor, wherein the at least one processor is configured to: detect a first event for temporarily using the eSIM (201, 550) while the at least one processor is connected to the second slot based on the switch being in a first state; based on detecting the first event, control the switch to change from the first state to a second state, wherein the at least one processor is connected to the eSIM (201, 550) based on the switch being in the second state, and wherein, the at least one processor is further configured to: perform, while the eSIM (201, 550) is connected to the at least one processor, an operation associated with the eSIM (201, 550); and control, based on performing the operation associated with the eSIM (201, 550), the switch to change from the second state to the first state. detect a first event for temporarily using the eSIM (201, 550) while the at least one processor is connected to the second slot based on the switch being in a first state; based on detecting the first event, control the switch to change from the first state to a second state, wherein the at least one processor is connected to the eSIM (201, 550) based on the switch being in the second state, and wherein, the at least one processor is further configured to: perform, while the eSIM (201, 550) is connected to the at least one processor, an operation associated with the eSIM (201, 550); and control, based on performing the operation associated with the eSIM (201, 550), the switch to change from the second state to the first state. perform, while the eSIM (201, 550) is connected to the at least one processor, an operation associated with the eSIM (201, 550); and control, based on performing the operation associated with the eSIM (201, 550), the switch to change from the second state to the first state.