Current Theshold Pin of Flyback Converter controller
The extra \$RC\$ elements connected to the ITHN are forming a type 2 compensator together with the internal operational transconductance amplifier or OTA. This configuration is adequate to implement a primary-side-regulated flyback converter for instance where there is a need for some regulation means in the primary side.

Before you tackle the calculations of the type 2, you absolutely need the control-to-output transfer function (TF) or the power stage ac response of your converter. That means if you stimulate the converter from the ITHN pin, how does the stimulus propagate through the control section and the power stage to generate the response observable across the output load? The best is to use a program like SIMPLIS to study this response. Examples on how to do that are available in the seminar I taught at APEC in 2018. Without this transfer function, you cannot attempt to stabilize the converter. The typical information you need from this TF are the gain (or attenuation) at the selected crossover frequency  \$f_c\$ and the phase lag at this point.

Now for type 2 compensator, look at the below circuit I excerpted from my APEC seminar taught in 2010. You can see the output of the OTA connecting to the \$RC\$ elements. This OTA is affected by a transconductance \$g_m\$ and that is a design parameter as you can see in the formulas.



When you have the control-to-output transfer function you read the magnitude curve at the selected crossover which is 5 kHz for instance. Assume you read -15 dB. It means the type 2 compensator should be tailored to offer a 15-dB gain at 5 kHz to force a 0-dB loop gain at 5 kHz. 15 dB means a gain of 5.6 and this is parameter \$G_{fc}\$ in the formulas. Then, you have to position the zero \$f_z\$ and the pole \$f_p\$ based on the phase boost you need. Assume you read a phase of -70° at 5 kHz from your control-to-output Bode plot. This is \$Arg(H(f_c))\$. Then the phase boost generated by the type 2 converter for a 70° phase margin (PM) for instance is calculated as follows: boost= PM - \$Arg(H(f_c))\$ - 90°. In this case, the necessary boost is 70-(-70)-90 = 50°. From this value, you determine how to position the pole and the zero (all is in the seminar). If everything goes well, you obtain this  transfer function for the type 2 section only:



Then you check the entire chain and simulate the loop gain which is the control-to-output transfer function cascaded with the response of the type 2. You should read the correct crossover and phase margin. It's only the beginning of the process and the stability analysis, you must now check all margins are safe at low- and high-line conditions, full and light load, tolerance analysis with Monte Carlo runs and so on. Quite a job if you want to do it seriously. You have a lot of data in the seminars that I linked but I wrote a complete book on the subject if you want to go deeper in loop control.