At Dubai airport, because you only have hand luggage, you can transit between terminal 1 and 3 without clearing immigration, as they are connected through the transit corridor.
However, since you have two separate bookings, you'll likely be denied boarding at YVR. Many check-in clerks will argue that Dubai is your final destination, and thus require the relevant entry documentation for the UAE.
My advice, go to the airport immediately, show the check-in clerks your onward flight confirmation to Kabul, explain that you'll only have hand luggage, and ask if they will let you board without a UAE visa. If they say yes, insist that they write you a confirmation that you can take with you to show staff at the gate if necessary.
If they insist you need a UAE visa, try contacting them again later, as different agents may say different things. If at least three different agents all keep insisting you need a UAE visa, you can get one online
Do NOT, under any circumstances, let them play their standard card: "we don't know, it's not our responsibility, ask the embassy". They do that all the time, but on the day of travel, suddenly they know exactly whether to let you board, and won't change their mind even if you call the embassy in front of them.
What they won't tell you is that they rely on a database called Timatic, which says (regarding Dubai):
Visa required, except for holders of confirmed onward tickets for a max. transit time of 24 hours
However, like I said check-in clerks often interpret this as "holders of confirmed onward tickets in the same booking"¨
Like I said, clear this up immediately.