Bought a car battery charger and I was wondering if it would be alright to remove my truck’s battery and charge it.

Had to jumpstart my truck last weekend and I want to make sure the battery doesn’t die again when I need to start the truck.