Android 9 itself doesn't do anything bad to the battery: I'm on 10 now, but used 9 for a year and the battery was no worse than 8, perhaps marginally better. However, that's not to say that a bad implementation by the manufacturer for a particular model can't do this, it's just noting that Android 9 itself isn't intrinsically bad for battery.
What I would suggest is looking at your battery stats to see what is eating the power. Unless you live in a fringe signal area 40% overnight is crazy, so something is consuming too much. It might be a bad OS implementation, but it could be that you have an app that's not really compatible (even though 9 has been out for over a year - not all apps will have been updated at all in that time, and those that have won't be tested on all devices). If your system's battery stats won't tell you anything then try a third party battery monitor.
(And yeah, I call it "9" because "Pie" has always sounded stupid to me. Probably in part because being British "Pie" doesn't imply a dessert, and if someone says "pie" without specifying it's almost certainly savoury, as in "pie and chips" (where "chips" means "like fries only thicker cut", not thin fried potato disks that come in an environmentally dodgy plastic bag, which we would call "crisps". What was that saying about "2 nations divided by a common language"?
)).