i mean if you were super young you could get away with it for a time but when you get older that won't work man.
when you lift weights you are breaking down the muscle, and for it to strengthen and grow more muscle tissue that magic happens when you are resting. when a cat goes hunting outside and catches a mouse, it eats it then comes inside and naps to recover from the hunt, then goes back again and kills again. that is how it works in nature so rest is just as important as your workout