There is the following step to be followed here:
Step 1. Enabled annotation processing for your project under File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processor
Step 2. Install lombok plugin in IntelliJ IDE after that restart IDE. Screenshot
Step 3. Add the dependency in build.gradle file.
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
hope this answer is helpful for you.