Rookie-mechanics

I have a 2001 Nissan Altima I bought at an auction it’s real clean but has a few problems one of them is that after a month or so my battery died could it be my alternator need answers