SO I found the solution to this. Firstly, I was opening Xcode using Rosetta. Once I unchecked it. I was able to run the extension. So this can be a bridging problem between intel to apple silicon. If anyone has any idea about the same in-depth please comment below.
Topic:
App & System Services
SubTopic:
Core OS
Tags: