This error only occurs when I try to launch a 1.17 pre-release or a recent snapshot. Every older version works fine.
Related issues
Comments

Duplicate of MC-128302. Please see the "Moderator Note" attached to that tickets for steps to potentially fix this issue.

To those saying update your drivers: They're already updated, I've tried every solution I could find on YouTube, and nothing worked. Saying this again it only happens on the pre-releases and the recent snapshots.

Yeah, I had the same problem on dad’s 10 year old laptop. The drivers are up to date and I can’t play versions that are above 1.16.5
The very proffesional conclusion i came to is the graphics card was too old to handle it.
Thank you for your report!
We're tracking this issue in MC-128302, so this ticket is being resolved and linked as a duplicate.
This is known to be a problem with your computer.
– Update your graphics card drivers. (Do not rely on automatic updates)
– If you are using Java arguments to increase the amount of memory, please reduce it to the default 2GB.
– If that did not help, please contact Community Support and refer to this ticket (e.g. "I have reported this issue on Mojira as MC-XYZ.").
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

https://www.minecraftforum.net/forums/support/java-edition-support
I got lots of hits when I searched for this error.
Update your drivers