An electronic device comprising: a housing including a front plate , a rear plate facing away from the front plate, and a side member surrounding a first space between the front plate and the rear plate ; a display panel exposed to an exterior of the electronic device through the front plate and configured to detect a pen input using a magnetic field; a speaker structure disposed between the display panel and the rear plate , and including: a first surface facing the display panel , a second surface facing in a direction opposite the display panel , a side surface surrounding a second space between the first surface and the second surface, and a yoke facing the first surface; a first shield structure made of a ferromagnetic material and disposed on the first surface, the first shield structure being configured to reduce an affect of a magnetic force of the speaker structure on the display panel ; a cooling member disposed between the display panel and the yoke of the speaker structure , the cooling member being made of a conductive material, and wherein the first shield structure is disposed between the cooling member and the yoke , wherein the cooling member is formed as a single body with a side member , the cooling member and the side member being configured to discharge away heat that is generated from the speaker structure . a housing including a front plate , a rear plate facing away from the front plate, and a side member surrounding a first space between the front plate and the rear plate ; a display panel exposed to an exterior of the electronic device through the front plate and configured to detect a pen input using a magnetic field; a speaker structure disposed between the display panel and the rear plate , and including: a first surface facing the display panel , a second surface facing in a direction opposite the display panel , a side surface surrounding a second space between the first surface and the second surface, and a yoke facing the first surface; a first shield structure made of a ferromagnetic material and disposed on the first surface, the first shield structure being configured to reduce an affect of a magnetic force of the speaker structure on the display panel ; a cooling member disposed between the display panel and the yoke of the speaker structure , the cooling member being made of a conductive material, and wherein the first shield structure is disposed between the cooling member and the yoke , wherein the cooling member is formed as a single body with a side member , the cooling member and the side member being configured to discharge away heat that is generated from the speaker structure . a first surface facing the display panel , a second surface facing in a direction opposite the display panel , a side surface surrounding a second space between the first surface and the second surface, and a yoke facing the first surface; a first shield structure made of a ferromagnetic material and disposed on the first surface, the first shield structure being configured to reduce an affect of a magnetic force of the speaker structure on the display panel ; a cooling member disposed between the display panel and the yoke of the speaker structure , the cooling member being made of a conductive material, and wherein the first shield structure is disposed between the cooling member and the yoke , wherein the cooling member is formed as a single body with a side member , the cooling member and the side member being configured to discharge away heat that is generated from the speaker structure . <EOS>