The short answer is, yes. In fact the battery is being recharged by the alternator in your car whenever the engine is running. Sometimes this fix isn’t enough, and your battery requires an external recharge. It’s best to ask a professional about this as you could void the battery warranty recharging it yourself.
Sometimes external recharging is not the best option because every battery eventually reaches a point in its life where replacement is the only answer to avoid unexpected breakdowns.