World number four Elena Rybakina beats Marta Kostyuk to win the Stuttgart Open – her third title of the year.