Hi Maria,
You cannot resize from B2ms to D8s_v5 because D8s_v5 does not have a temporary disk. Since B2ms has a temporary disk you are limited to VM sizes that include a temporary disk.
Change the size of a virtual machine - Limitations
https://learn.microsoft.com/en-us/azure/virtual-machines/resize-vm?tabs=portal#limitations
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP