I'm trying to spawn more than 2000 bullets but it's not working

I’m trying to do a simple bullet spawner but it lags a lot when reaches about 1k7 bullets, I’ve seen YouTubers can do more than 8k bullets but my English is too bad for me to read the Documents, and I only understand a little, here’s my code, hope someone can explain to me how to improve my code a bit, thanks

the world, where I spawn bullets

the bullet scene

the bullet spawner

Video:

I’ve watched this video but I don’t understand how he did that, I tried to create a Sprite2D like him and used PhysicsServer2D with the Sprite2D but i don’t know how his code works at all