How many mins or hours should you workout?

I workout at home in my garage. i have a tridmil and some weights and balls. I workout for about 40- an hour depends if i’m okay or if i’m sick or something.

i just want know what’s a healthy hours or minutes to workout ? and how long do you workout for ?? just curious cuz i read that you shouldn’t workout too many hours