20+ year dev here, successful CTO, built many production systems, etc. I tend to bomb >50% of tech interviews.
I started doing better when I realized most tech interviews are not aligned with my brain, and that is ok. I have bad recall for syntax or even for things I've built in the past if I'm not currently engaged with them. This can come across like I am a bullshitter, or wholly incompetent. I also stumble through leetcodes - I remember enough to identify to right approach but fumble knocking out solutions in 15 minutes.
But this is fine! If everyone at a company has focused on powering through leetcodes to get the role, or the job demands photographic memory of HTTP codes ("what is code 428 used for?" An actual interview question I have seen...) I am probably not a good fit and won't enjoy the work or the culture.
Once you focus on the things you do well and find companies whose interview process emphasizes those aspects, things become much easier. Let go of the feeling that every interview is a minimal bar that any functioning SWE should be able to pass. If it was, they would be hiring every other applicant.
Some roles they give you a task and fail you quietly if you don't solve it using TDD, even if they don't mention that as a requirement. Or if you don't ask details about requirements, even for narrow toy problems. You are never going to guess all the gotchas that a company can throw up in front of you, so my advice is to confront each interview by working in the way you like to work. Show off your good attributes when you can. Listen to hints of course, but represent yourself honestly and assume at least half the companies will reject you no matter what you do, and that is fine.
Often that attitude will earn you more marks than trying to conform to what you guess the company wants to see.