So if you do wp db export and no file was created, make sure to check your error_log file and if you notice this error:
PHP Fatal Error: Uncaught Error: Call to undefined function exec()
To fix this you need to enable the exec extension if possible. For cPanel enable the exec extension in PHP Selector
or if you have WHM access (VPS or Dedicated server) then you can also edit the php.ini file directly.