ooh, you got "doored". Riders have been badly hurt by hitting car doors at speed, so you got off kind of easy. I stay a door width away from cars. If there's a bike lane right next to the parking lane, I have to ride way over at the left lane stripe.
If I have to ride closer to cars, I'll slow down, and try to see if anyone is in the cars ahead. But that's hard to do!
Headlights
Just about any headlight in blink mode is helpful during the day or around sunset.
Most modern USB rechargeable headlights are bright enough for safety as a "be-seen" light. To light up the road at a moderate bike speed, I like at least 400 lumens. 600 or 800 would be nice, but more expensive. (Some no-name brands greatly exaggerate their lumens, but most bike store lights are at least close to their rated lumens.)
Tail lights
I like a bright blinking tail light and two of these reflector straps. REI
Jogalite Wide Leg Band.
They are extremely reflective, and the up & down motion from two of these makes it obvious it's a bike. It's easy for the cars to understand how close they are to me, since there's two separated reflections. They are good for side visibility, too. Very comfortable to wear. Other bands would work, but these are extra reflective.