Set AutoPlay defaults in Windows 11/10
While you can enable or disable AutoPlay using Control panel, Group Policy, or Registry Editor, Windows 10 lets you enable, disable and set AutoPlay defaults easily via the Settings app. Open Settings app and click on Devices. Select AutoPlay from the left side. To enable AutoPlay, move the Use AutoPlay for all media and devices button to On. Next, you can choose and set your AutoPlay defaults.
Manage AutoPlay settings for Removable Drive on Windows 11/10
For Removable drives, the following options are available from the drop-down menu:
Manage AutoPlay settings for Memory Card
For Memory Cards, the options available are: Set your options and exit.
Manage AutoPlay settings for Phones
For Phones, the options available are: Set your options and exit.
Configure AutoPlay defaults via Control Panel
There is another way, and that is via the Control Panel. Open Control Panel > AutoPlay.
Here you will be able to configure your AutoPlay settings for each media; Set your options and exit.
If you wish, you can prevent AutoPlay from remembering User Choice in Windows.