I am not sure what you mean by "another way to keep the ordering based on the hwy". In the original mpg data set there are, for example, 18 entries with manufacturer = audi. If you plot
ggplot(mpg,aes(manufacturer,hwy))+
geom_bar(stat = "identity")+coord_flip()
the audi bar will have those 18 hwy values stacked on top of each other. If you want that plot to show the manufacturers ordered with respect to the sum of hwy, you can do
mpg <- mpg |> mutate(manufacturer= fct_reorder(manufacturer, hwy, sum))
ggplot(mpg,aes(manufacturer,hwy))+
geom_bar(stat = "identity")+coord_flip()