Why do I have THREADPOOL waits even though I have threads available?
I am not able to understand why I am seeing THREADPOOL waits when I run the first query, but second query shows threads are still available. Can any one please explain?

I've observed that you can see lots of really brief THREADPOOL waits (a handful of milliseconds each) while SQL Server is acquiring threads from the operating system.
This might happen if, for example, SQL Server was idle for a while, and then several parallel queries are executed at once.  These queries will need to wait while the OS provides threads to the sqlservr.exe process, accumulating THREADPOOL waits during that time.
You can confirm this is happening by watching the &quot;Process&quot; -&gt; &quot;Thread Count&quot; PerfMon counter.  Generally, whenever this value climbs rapidly, you might see these THREADPOOL waits.
There's a complete demo of this behavior on my blog (Unusual THREADPOOL Waits), here's the summary:

Going back to that docs link:

Occurs when a task is waiting for a worker to run on.

In the typical case, this is because we’ve reached the logical limit SQL Server has set for how many workers threads you can have at a time.
In the unusual case, the task is waiting for a worker because SQL Server is allocating the thread (requesting it from the OS) that is needed to back that worker.

To be clear, I'd be surprised if these waits were the cause of your application timeouts.