Thanks for reaching out, Abhinandan.
In QuickBooks Online, journal entries don't have the option to apply tax to individual lines like you can with invoices or bills. Journal entries are meant for manual accounting adjustments and don't connect with the sales tax feature.
If you need to record a transaction where some amounts include tax and others don't, I'd recommend using an Invoice, Bill, Expense, or Check instead. These transaction types can turn tax on or off for each line item.
If you need to use a journal entry for an adjustment, you'll need to debit or credit your income or expense account for the amount without tax, then separately debit or credit your Sales Tax Payable account for the tax portion.
Please let me know how it goes or if there's anything else I can assist with.