It is not worth keeping a totaled car in most cases, since the cost of having it repaired typically outweighs any potential benefits. Once a car is totaled, the state will give it a salvage title, meaning that it cannot be driven legally unless the owner has it repaired, inspected, and reinsured. The process of repairing a salvaged vehicle to make it roadworthy again can be expensive, and depending on the extent of the damage, it may not even be possible.
Even if you do rebuild your totaled car, you may struggle to insure it, since not every insurance company covers rebuilt titles. Additionally, the total loss will be added to the car's vehicle history report, which will likely make it difficult to sell later on.
If you still decide that you want to keep your totaled car, you need to notify your insurance company, and they will subtract the car's salvage value from their settlement. Bear in mind that if your car is leased or financed, your lender or lessor will have the final say on whether or not you can keep the vehicle.
To learn more, check out WalletHub's guide to totaled cars.