Filing taxes with no income

Sorry if this is a stupid question...

Can you file taxes if you didn’t earn an income?

Someone told me I could get in trouble for not filing taxes and I tried to online but it needed a w2. Which I don’t have because I haven’t worked this last year due to several health issues. :(