Ideally, you want to obtain your trademark as soon as possible - that is - at the very start of your business. The protection of your brand starts from the date of filing, not the date of registration, so if you already have your product in stock, we'd recommend not waiting and starting to sell them.
However, the protection offered is, of course, only valid if the application gets successfully accepted in the end. If it gets dismissed, you'll lose this protection. For this reason, you might want to wait until acquiring large quantities of your products. In the worst-case scenario, if your application is refused, you will have to rebrand and having a large amount of stock will make the process more difficult.