I'd argue this largely depends on a number of different factors, including (but not limited to) the size, pull, relevance, experience, live show quality, and amount of good material of both potential artists; when they played last and in what spot,...
And then there's the question of "better" for whom?
The festival? Giving a lift might be more contemporary or more "Glasto" whatever that means, but might hurt sales and/or public perception.
The "new" artist? Headlining Glasto and the exposure that brings can certainly be a nice leg up and accelerate the career. It can also backfire if the artist isn't yet up for the task. Most likely though it ends up in an okayish headline set and realization that headlining a smaller stage or subbing would probably still be the better way to go.
My point being - it's not a straight and clear yes (in general, not specifically talking about SZA and Kylie).