In my node example twitch_misc/server.js at main · BarryCarlyon/twitch_misc · GitHub it’s all handled by the libraries I use for it. So you might be able to follow the depenacies backwards.
Following it back leads me to node-jwks-rsa/utils.js at 4e221406c256d2b34ced4e11498fa85ab3cd4a23 · auth0/node-jwks-rsa · GitHub
Where the library I use will grab the keys[0]->n (well the keys from the key file as a whole) from https://id.twitch.tv/oauth2/keys and then attempt to convert that to a PEM to then be used.
I don’t know what the .net equivalent is for this.