how to edit open graph meta description programmatically and in which file

They’re probably somewhere in the header.php file, or wherever the HTML <head> section is. Look for

<meta property="og:description" content="Something something" />