My oil filter wasn't tightened all the way and I
lost every bit of oil. It made a noise like
valves rattling then shut off. Is there a
sensor that makes the engine shut down??
No, your engine is probably damaged and will need replacing. Put oil in it and hope for the best.
It didn't knock or make any loud noises
That is good. Try adding oil.
usually the first thing to suffer is the piston rings dry and seizing at the cylinder walls , if it is tight and not turning over it was very dry and ready to resist enough to shedder a camshaft , in that case pull the plugs and squirt thin oil or transmission oil on the pistons and try working the crankshaft for and back by a socket wrench on the front crank pulley nut ! the noise you hope was just the lifters collapsing from no oil pressure and no pump up