@katiev $wpdb->prefix
is an object value string that contains the prefix you assigned to your WordPress database when you first set it up. So in your case, your prefix is just ‘wp’. The code itself will work just fine as is. The suggestion for changing out the $wpdb->prefix was just for using a straight up SQL query within phpMyAdmin.
You can add the code anywhere in your functions.php file. This is the exact code you need to add to your theme’s functions.php file:
$wpdb->query("UPDATE {$wpdb->prefix}_nm_personalized SET the_meta = REPLACE(the_meta,'new.littlebachco.com','littlebachco.com')");
Then just load or refresh any page and the database entries will be updated. Remove the code after loading or refreshing a page. It only needs to be run once.
NOTE: One other thing to consider is that the PPOM plugin references the ID of the post of the image for the cart / emails so if you uploaded the associated images to the primary domain in a different sequence than the subdomain then the images in the cart and emails probably won’t show. I had to manually replace EVERY image in EVERY PPOM meta group. If you are still having issues after running the above code then that is what you will also have to do.
Also, for future reference, moving a WordPress installation from one domain to another is best accomplished by doing a search and replace for the old domain to the new domain throughout the entire database and copying the files. There are boundless articles on how to properly move WordPress from one domain to another. This article would be useful in your case:
https://www.wpbeginner.com/wp-tutorials/how-to-properly-move-wordpress-from-subdomain-to-root-domain/