As of API 30, if you want to read / write any file type from/to external storage, you're supposed to let the user choose first the location of the file. With API 33, some specific permissions were added to allow programmatic access to media files, but nothing else.
Link:
Learn about changes in Android 13 that will affect apps when they target Android 13 or higher.
developer.android.com