A Thanos from 2014 traveled forward to the 2023 timeline, with the help of 2014 Nebula (who took the place of 2023 Nebula), then blew up Avengers Headquarters.

Nebula helped him out

I know that… But without Pym particles how could Thanos bring his whole army

But… How did he come without the use of Pym particles?

The 2k14 Thanos had access to the 2k23 nebula’s memory, from there he could easily find out whatever he wanted to know about Pym particles and remake them.
Then the 2k14 nebula was already in 2k23 to get him across whenever he was ready.