Did you check the link provided by Jack-19?
What did this indicate was using your battery?
Do you have apps updating over cellular data? (Settings > App Store > Automatic Downloads)
Did you have poor cellular reception?
You should really just be leaving your phone plugged in overnight, every night. All you're really doing by not having it plugged in when it should be plugged in is increasing your charge cycle count. If you just charge your phone every night overnight, and make sure Settings > Battery > Battery Health > Optimized Battery Charging is turned on, your phone will learn your nightly habit and top off the charge when necessary..
No need to disconnect it from WiFi, in fact that's when automatic backups/updates would be occurring.
Also, how did you disconnect from WiFi? If you just tap the WiFi icon in control center, that only disconnects until 'tomorrow'.. so your phone may well have reconnected to your WiFi network at midnight and been doing updates or backups, etc.