C172 Pilot reported engine failure inflight.

Date: 2022-11 · Aircraft: Skyhawk 172/Cutlass 172

Anomalies: aircraft-equipment-problem-critical|deviation-discrepancy-procedural-published-material-policy|inflight-event-encounter-fuel-issue

Synopsis

C172 Pilot reported engine failure inflight.

Narrative

After flying for a little under an hour; my instructor realized our fuel was burning unevenly from both tanks (more from the left than the right). To correct; we decided to switch tanks to just the right tank rather than 'Both'. I can't remember how long it was after switching tanks; but I remember hearing the engine die off and the throttle having no response. I told my instructor that we lost all engine power; pitched to slow down for best glide but not stall; and the instructor took the controls. After trying to gather myself; I asked if we should [request priority handling]. Instructor said yes; as I assumed; and I took the comms while the instructor flew and I [requested priority handling] with complete loss of engine power. After trouble shooting for 30 seconds to a minute; we realized the fuel selector switch was stuck and never became fully engaged to the right tank selection. We switched the fuel back to both to be safe just in case there was in fact an issue with switching the fuel selector switch to the right tank; and the engine restarted due to wind milling of the prop. After this; since we already requested; we headed back to ZZZ and landed without issue.Over the past year or so I have been on and off of training after taking an over year long break from flying. Because of this; I not only lost proficiency but lost knowledge I used to retain. I had studied religiously for my commercial maneuvers; but taking for granted that the plane would fly without hiccups. I thought I knew my procedures like the back of my hand; but in the moment I did not. Fuel should have been the first thing I checked. I blanked in the moment; and I should have instantly thought of the fact that I recently switched tanks; and the engine must have starved of fuel somehow. I should have instantly looked down at the selector switch to indicate the obvious issue and acted on that. If I knew the procedure off of the top of my head; or instantly grabbed the checklist; the issue could have been resolved in a matter of seconds before having to request. I could have prevented the issue completely if I had verified the selector switch was fully engaged visually from the start.I plan on taking a step back and evaluating my knowledge of all procedures. My CFI and I will be going over procedures together and individually. I believe I became complacent; trusting nothing will go wrong. I need to be proactive and preventative rather than reactive. I need to take procedures and training more serious because they can and will happen to anyone; myself included. I do not want to hesitate to [request priority handling] in the future if needed; but I also need to know my procedures; checklists; and flows before getting into an aircraft as Pilot in Command (PIC) to prevent having to do so. I should not have had to rely on my instructor to take controls. I should have known how to solve the issue immediately; or at least known the correct list to follow. I hesitated because of my lack of confidence; knowledge; and proficiency. I will talk with not only my current instructor; but recent and other instructors I know of for advice. I want and need to become as proficient and knowledgeable of the aircraft and procedures surrounding it. I wish to learn from my mistake(s) and prevent it from happening in the future; as well as being more than prepared for other possibilities whenever I get into an aircraft.

Source: NASA Aviation Safety Reporting System (public domain). Reports are voluntary submissions and are not verified by NASA.