unfortunately I got hit by a car. I was on the main road, in the cycle way and the car had a stop sign coming out of a school. He did see me but got distracted by the kids. Anyway, I was wondering if you could help me out determine is my bike is safe to ride or I should do anything about it. The rear fork is a bit bent but not broken and it's aluminum. It's a Cube SL bike. Thanks in advance!
Safe - probably yes. Good idea - no.
As Argenti Apparatus stated, the bike should not fail without some warning, but it probably will fail sooner or later. As people noted in the comments - the geometry seems to have been changed - the wheel seems to be pointing slightly to right, the drop-out seems out of plane etc. The hub axle might be bent, also the bent drop-out may be causing extra stress on the bearing - in that case the rear hub will fail pretty soon. The bicycle will not ride straight now, and some parts will likely not work right and die much faster (shifting might be off similar to bent hanger, disc brake may act up if it is misaligned).
If you ask frame maker they will tell you the frame is busted and you have to exchange it. You could try to find someone who can bend the seat stay back into correct position and weld some piece of aluminum to strengthen the damaged part, but your mileage with this kind of hack repairs may vary. My biggest fear would be, that after some time riding new weakened areas might show up, requiring additional welding. If you want to go that way, you should find a good bike service and ask them for recommendations - often these places know of aluminum welders (at least here, in Poland).
Also - welding aluminum (requires TIG) could be expensive and it might be cheaper to find new frame and swap everything from the old bike to new. Winter is coming™, and so you can find good deals on new frames. Couple of suggestions.
https://www.chainreactioncycles.com/brand-x-rd-01-road-frame-and-carbon-fork-2019/rp-prod130456 (be careful - I think there is no disc brake mount on this frame).
Note that whatever you decide to do, you should not use the bike much in the meantime - the components increased wear will add up to whatever you have to spend on repairs.
Aluminum alloy is weakened by being bent. The seat-stay is bowed in so that loads will tend to bend the stay more. The stay probably will not fail suddenly, but it will develop a crack where it's bent if you keep riding it.
It's probably OK to ride on temporarily, even if the stay does fail the other stay will support the wheel.
You say the bike is a Cube so presumably you are in Europe. The driver's insurance will cover the damage done to the bike, or you can sue the driver in some sort of small-claims court.
Further data - a change in geometry like that can screw up the handling something awful.
I rode this damaged steel-frame bike for a while:
That photo was before I straightened it somewhat with clamps and cold pressure. Being steel that was much more acceptable than your bike where straightening will weaken the metal further.
The bike was "okay" but always a bit odd on fast descents. In later rides I wore out the wheels, so fitted a used pair with different rim shape. Immediately the hill handling got horrible, to the point I wondered if my wheels were faulty. Inspection showed they were fine.
On a trip with another rider, he commented that my rear wheel looked "buckled" while descending. It turned out the seat stay was flexing more on one side than the other, making the dropouts move relative to each other.
This also backed off the cone nuts over time, which didn't help.
Upshot? Frame's toast and should be replaced for peace of mind.