What you are looking for is called "non-owner car insurance." It is for people in exactly your situation: someone who does not own a car, but frequently rents or borrows cars and needs liability coverage.
Not every insurance company offers it, and it is not available in every state. In addition, if you live in the same house as someone who does own a car, you are probably not eligible to purchase non-owner insurance. So you'll have to do some more investigating to see if you'll be able to get this. Here are a couple of articles about the subject:
- NerdWallet: Non-Owner Car Insurance
- Bankrate: No car? You may need nonowner car insurance
If you don't drive enough to justify non-owner car insurance, the next thing you could look into would be a personal umbrella policy. This is liability insurance that kicks in after you have exhausted your other liability insurance. Normally, this policy requires that you hold the maximum liability coverage on your car, but since you don't have a car, this might be waived. You'll have to look into this to find out if it is possible for you.
If you can't get either type of coverage, but you still want liability insurance, you are probably best off just taking the coverage from the rental company on those rare occasions when you rent.