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, which is detachable; a second slot selectively connectable to the at least one processor and configured to receive a second SIM which is detachable; an embedded SIM, eSIM, 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 to the at least one processor , wherein the at least one processor is configured to: detect a first event for temporarily using the eSIM 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 based on the switch being in the second state, and wherein, the at least one processor is further configured to: perform, while the eSIM is connected to the at least one processor , an operation associated with the eSIM ; and control, based on performing the operation associated with the eSIM , 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, which is detachable; a second slot selectively connectable to the at least one processor and configured to receive a second SIM which is detachable; an embedded SIM, eSIM, 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 to the at least one processor , wherein the at least one processor is configured to: detect a first event for temporarily using the eSIM 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 based on the switch being in the second state, and wherein, the at least one processor is further configured to: perform, while the eSIM is connected to the at least one processor , an operation associated with the eSIM ; and control, based on performing the operation associated with the eSIM , the switch to change from the second state to the first state. detect a first event for temporarily using the eSIM 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 based on the switch being in the second state, and wherein, the at least one processor is further configured to: perform, while the eSIM is connected to the at least one processor , an operation associated with the eSIM ; and control, based on performing the operation associated with the eSIM , the switch to change from the second state to the first state. perform, while the eSIM is connected to the at least one processor , an operation associated with the eSIM ; and control, based on performing the operation associated with the eSIM , the switch to change from the second state to the first state. <EOS>