Just to clarify, are you referring to link the deposit to the cheque? If that's the case, then you'll have to unlink the bill payment cheque from the bill.
Let me show you how:
For your visual reference, I've attached some screenshots below.
From there, you're able to apply the check to the deposit transaction.
I'm linking an article just in case you want to learn some various tasks in QuickBooks Online (QBO): Help Articles.
That'll do it. If you're referring to something else, just leave a comment below. I'm always here to help.