Unfortunately, it is not possible to modify metafields on the thank you page using only Liquid. This is because Liquid is a templating language that only affects the output of a page and does not have any access to the Shopify database or the API.
To modify a metafield on the thank you page, you will need to use the Shopify API or an app that provides this functionality. Using the Shopify API, you can create a webhook that triggers a script to modify the metafield when an order is created. You can also use an app from the Shopify App Store that provides metafield editing functionality.