Hello again @Ibrahim Jamil
Indeed the ASIC on the N9K is the one dictating what function can have a switch. Note that there are also ASICs which can work both as Leaf and Spines: LS / LSE = Leaf Spine Engine:
But don't let the name confuse you, there are ASICs which can work as spines if they are on modular chassis (X9700-EX or X9700-FX linecards) and as leaf switches if they are standard 1RU/2RU switches (9300-EX or 9300-FX). And guess what? There are other switches (N9K-C9316D-GX, N9K-C9364C-G, N9K-C9332D-GX2B, N9K-C9348D-GX2A) which can work as both Leaf or Spine switch.
Best way to see what function a particular switch model can have, is to look at the Nexus 9000 Compare page:
https://www.cisco.com/c/en/us/products/switches/nexus-9000-series-switches/models-comparison.html
Click on any category and you will see if the model can be leaf, spine or both, for both ACI and NXOS.
Hope it helps,
Sergiu