You did very well stating upfront your experience (which _is_ valuable, even if you didn’t enjoyed your past 4 years, you did learn stuff, believe me. Your skills do transfer onto different jobs.
Once in your new job, don’t be so much scared than enthusiastic: open your ears, eyes, state what surprises you and offer to help, within your role, with what you know already and what you are willing to learn. This will impress positively your team.
As to get ready, best is to ask your future coworkers or hiring manager these questions, they’ll have the best context to push to you (and in my opinion should also reassure you to wait until you’re there).
You got thru the interview process and received an offer, you should be set! It's fun learning new things and normally (in my experience) a new environment will be motivation enough to pick up a new stack and be productive.
Try to learn as much as you can about the new tech stack before you start. It will be hard to dive into how things work under the hood while also trying to meet deadlines. Even if they know it's a new stack for you, it might still be expected that you commit code by the first week.
Congrats and going for a change. I think if more people did this the world would be a better place :)
Good luck! I jumped from a super boring consultancy job to work at a startup doing backend work which I never have done before besides the odd Django personal project.
My recommendation is to first take some time and learn the tech stack. Take a course on the language, get familiar with AWS or whatever the infrastructure is, etc.
Second, once you start, try to just get everything up and running beginning to end. Hopefully you can contribute some updates to documentation right away this way!
After that, try to deploy a change, talk to the other engineers about the design history and why things are built the way they were, etc etc. Have fun!