Many researchers in biomedical engineering and related fields are interested in exploring the feasibility of using electroosmosis in microchannels to move fluids, which can be done with micro-pumping or micro peristaltic pumping. Due to the one-of-a-kind properties of nanoliquids and their significance in processes like peristalsis, inquisitive scholars have studied the behavior of peristaltic nanofluids while accounting for the effect of electroosmosis. This study aims to assess the impact of electromagnetic fields on peristaltic heat and mass transfer inside a non-uniform channel, with electroosmosis considered. This study explicitly accounts for electroosmotic effects by deriving concentration, temperature, and velocity fields from a complex coupled partial differential equations (PDE) system. The electromagnetic experiments being conducted as part of the inquiry are essential, but electroosmosis is also a crucial part of the research. Furthermore, specific physical features of Casson and Newtonian liquids are investigated to determine the impact of several factors. Some examples of these variables are the skin friction coefficient, the Nusselt number, and the Sherwood number. It also visually examines the trapping phenomena that occur inside the system, emphasizing the role that electroosmosis plays in developing these events.