I can really relate to this as I was completely burnt out by year 12, my motivation was gone and my mental health was at its lowest. I still came out fine and got into the degree I wanted, but even if I hadn't, I realise now I'm in uni that there are SO many options for getting into your degree even if you don't get the ATAR you want. Year 12 is really hard, not as much because of the work but because of the mental rollercoaster you're on.
The other replies have given some really good advice already so I just want you to know that your grades don't define you and there is support out there. We're here for you and if you have any questions about uni and planning for uni, I'm sure there are lots of us who will be able to give you any tips 😊