Thor's Stormbreaker has got the Bifrost capability. Why didn't he simply use this to transport
into the Sun when he arrived on Earth in Avengers: Endgame?
There would be zero point in doing so as the only winning outcome is exactly what we see in the film as indicated by Doctor Strange. But to play along with the question, why wouldn't he? I'd imagine it's probably best explained in Thor: Rangarok, the Bifrost isn't some tamper proof system, people can hijack into it and can fall out of it, as Loki and Thor do when fighting Hela.
If Thanos could simply jump out of it there'd be no point in trying to transport him somewhere deadly because he would just escape it.