Apt has a serious problem debian 12 image rock5-B

I found an apt for a mali driver that would install, assumed it would work. Well, it broke the system. Could only ssh into and fix it with an apt autoremove. Now that removed some critical kernal modules and networking is broken…