It is registered in a CPU

https://en.wikipedia.org/wiki/Processor_register
Therefore, from the information on this link, there are limited floating point and general purpose registers in a CPU. My question is how these records are used. With that I mean, let's say that I defined some variables in Python, but I think it's stored in RAM or on the hard disk, so the CPU only uses those registers when it works with the data obtained from RAM and, if so, , to overload the capacity of the CPU, what kind of algorithm should be followed by a program of this type?