If you had the window open or a skylight open in your house then the lightning might go through the skylight or the open window and strike you but it's very unlikely that you'll get struck by lightning while inside your house.
Now your house could get struck by lightning and even catch fire but that's not very likely either but it can happen.
If you don't have a window open or a skylight open then it's impossible for the lightning to get through your house and strike you.
So you're safe inside your house during a thunderstorm and lightning.