Hi @Roger Roger ,
all Azure VM series have a fixed vCPU/RAM ratio.
D-Series: 1vCPU : 4 GB RAM
E-Series: 1vCPU : 8 GB RAM
F-series: 1vCPU : 2 GB RAM
Resizing a VM within the same VM series means increasing the number vCPU the RAM will increase as well based on the ratio of the series.
If you use a VM SKU of the E-series with 32 vCPUs the RAM will be 256 GB.
Source: Sizes for virtual machines in Azure
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten