I recall my niece contacting me in a panic, she was buying a new car, well new to her, she had insurance sorted to kick in at midnight but the seller wanted her to collect it a day earlier than planned. It as after 5 she couldn’t get hold of the insurer so I collected the car for her and she sat adoring it until 1 minute past midnight. She was so excited bless her, her parents were away and I was the nearest one she could call. She was fully aware of the implications of driving before her insurance was valid. It was her first car so there was no existing insurance.
If I were the OP I’d ask a solicitor to represent me but I’d try to find one that would present a sympathetic case. It was unlucky but and accident could have been a million times worse. The stakes are high here, a newly bought car and losing your driving licence plus a fine… that’s a lot.
Are there countries where picking up a car and driving it off the forecourt is OK? I know that ignorance of the law is no defence but if that’s the OP’s background it might help explain.