GitHub dynamically generates opengraph images for repositories and other pages such as issues and pull requests of a particular repository.
In their engineering blog, GitHub outlined their approach: they spin up a headless Chromium instance via Puppeteer, load a template with HTML & CSS, and take a screenshot of the DOM.