The transfer function expresses the relationship between the input and output of the system.
When the transfer function is G (s), the input is X (s), and the output is Y (s), it is defined as follows.

To calculate the transfer function, first calculate the differential equation of the system.
It can be obtained by Laplace transforming from there, expressing it with the s function, and taking the ratio of output and input.

■Specific example of transfer function calculation method

Let us consider an example of an RL circuit below. Click here for details on the RL circuit.

Laplace transform the above equation. Click here for Laplace transform.

I was able to find the transfer function in this way.