To enable Lightning Web Security in Salesforce follow these steps:
- Go to the Setup page.
- Navigate to "Session Settings". You can find it under the "Security" section.
- In the "Lightning Web Security" section, check the box next to "Use Lightning Web Security for Lightning web components (GA) and Aura components (Beta)"
- Click on the "Save" button to save the changes.
- By following these steps, you will enable Lightning Web Security for both Lightning web components and Aura components in your Salesforce org