Allow me to help share information about creating invoices in QuickBooks Online (QBO), @apandey.
QuickBooks automatically assign numbers to your sales forms starting with 1001. If you wish to use your own numbering format, you can customize the number to whatever you prefer.
In addition, if you've used the invoice number twice (duplicate invoice number), QuickBooks automatically notifies you and ask for a confirmation if you wish to use the number again.
You can see attached screenshot for additional reference.
I'm also attaching these articles for additional reference about creating invoices in QBO:
As always, please feel free to drop a comment below if you have any other questions about invoices. I'll be right here to help however I can!