Both IITs and NITs are institutes of national importance. But if you ever get the option between NITs and IITs always refer to the following preference order
The first preference should be the top 7 IITs then some second-generation IITs and then top NITs and lastly the newly established IITs. However, the order may be slightly different if you are looking for CSE. In that case, IIIT Hyderabad is a great choice and ranks above NIT Trichy.
Always give preference to your branch if you have a specific inclination.
Before understanding the prospects of either institute, you should rather find out whether you want to go for an institute based on its tag name, or the branch you are more inclined towards. One of my cousins recently chose NIT over IIT because he preferred giving his branch more importance, than the brand name.
It is suggested that you do the same. Keep similar options and determine what among the handful works best for you.