Garmin Smart Glide automates the first 30 seconds of an engine-out emergency - but it stops short of landing the airplane, and that limit is the point.
Fuel mismanagement is a leading cause of GA engine failures - learn the difference between exhaustion and starvation, and build the habits that prevent both.