To properly record these transactions in QuickBooks Online (QBO), first record the direct deposit from the investment withdrawal into your bank account. Next, use the Pay Bills feature to apply that deposit toward the payment of the specific bill.
To record the direct deposit, go to +Create > Bank deposit. Select your bank account. In the Add funds to this deposit section, put the source in the Received From field and select the appropriate account in the Account column. If you're not sure which account to use, please refer to your accountant. Enter the Amount and Save.
Since you already have a bill entered and expensed to your budget line item, just record the bill payment from the same bank account. QBO will apply the payment to the bill and assign the expense to the correct budget category.
Regarding whether you should create new accounts, only if the appropriate account for the deposit does not already exist in the chart of accounts. Again, that's worth a quick check with your accountant.
Leave a reply below if you have additional questions.