In prior studies focused on transcranial magnetic stimulator (TMS) coils, optimization of coil windings typically occurred on generic curved surfaces, such as planes or cylindrical shapes. However, these surfaces do not consider the challenge of coil misalignment, which arises due to variations in individual head geometries. This misalignment can significantly diminish the coil's effectiveness. To address this issue, we propose a novel coil design approach that identifies the 'best-fit' curved surface, minimizing the likelihood of mismatch with diverse skull geometries. We further enhance the coil winding pattern using the stream function applied to this custom curved surface. Numerical simulations using a hemisphere brain model demonstrate that the coil designed on this 'best-fit' curved surface exhibits a remarkable 22% increase in efficiency and a 41% expansion in stimulation area compared to the conventional butterfly coil. These findings underscore the advantages of our method in crafting high-efficiency and wide-ranging therapeutic TMS coil.