How can I know that I am saved?

Am I always wondering how can I know that I saved? I always went to church to attend services and worship God. But Sometimes I can’t avoid questioning myself if I am already saved. My friend told me even when we always go to church and read the bible but we never do good to other people we are not saved.

That’s why lately I’ve been questioning my faith because I always think about what my friend told me. I am confused.