Could be a number of things.
Could be another device connecting to your phone and affecting the volume. Turn off your Bluetooth and see if the volume is still affected. If you have a case, then check its not fowling the phones volume buttons. Remove the case and monitor.
Check for any routines, settings that affect volume levels. Also check for any 3rd party apps that also affect volume levels. YouTube has an ambient mode that may cause this behaviour. Other apps may have the same setting?
Finally boot to safe mode and monitor what happens to your volume level.