custom taxonomy – update attribute of specific products in woocommerce

I need to change the value of all product attributes that have a specific attribute with a specific value.
for example, I have 10 phones with Ram(attribute): 64 GiB (attribute value) and 5 Phone with Ram(attribute): 64 GB (attribute value).
I need to change all products with Ram: 64 GiB to Ram: 64 GB, So there will be no 64GiB anymore, I tried the below code and but they didn’t work

$product_id = 14352; //some product id
$storage = get_the_terms($product_id, 'pa_internal-storage');
$newStorage = '64GB';
update_post_meta($product_id, 'pa_internal-storage', $newStorage);