When you're a tenant and only rent you only need to have renters insurance.
You do not need to have any other building insurance such as flood insurance or earthquake insurance because that earthquake insurance, flood insurance and other building insurance would be paid for by the owner of the apartment or house.
All you need is renters insurance when renting if you want too or if the landlord requires you have renters insurance.
Renters insurance is usually pretty cheap monthly compared to the cost of homeowners insurance.
You would not be able to get earthquake insurance on the apartment or home unless you owned it and the insurance would be paid out to the owner of the house or apartment you're renting.