The art of explaining
Watching this long chat and the frantic attempts to explain perhaps the most primitive op-amp circuit, I am once again convinced that explaining is not an easy job (in any case, it is not easier than making devices). I have long since come to the idea that no matter how much we try to explain the specific circuit with specific explanations, they will not understand it (or at least they will think that they have understood it).
The idea is not just electrical. It exists in many other forms (analogies) around us; we only have to look around. It is not of today or of yesterday; ideas are eternal and immortal like the soul and their implementations are constantly dying like the human body.
So the art of explaining lies in revealing and showing the ideas behind circuits.
Basic idea
I will first formulate the idea in a compact form and then I will look at it step by step:
To set two variables in a desired ratio, they are subtracted with weighting factors in that ratio, and one of the variables is adjusted until the difference becomes zero (the so-called "virtual ground").
Implementation
The subtraction is done by summation, with one quantity having the opposite sign (inverted); that is why the device is inverting. Depending on the ratio between the magnitudes, the device can be an attenuator (< 1), a follower (= 1) or, most often, an amplifier (> 1).
Below I will try to convince you that the "inverting amplifier" was invented a long time ago.
Thousands of years ago...
The lever is one of mankind's greatest inventions. I believe that in addition to his three types of levers with a fulcrum, Archimedes also thought of a 2-way lever without a fulcrum. Imagine, for example, that you lower a bar on the left by h1 = 1 cm, but I raise it on the right by h2 = 5 cm. This results in a virtual ground of 1/5 from left to right that divides the bar into two parts with lengths l1 = 1 cm and l2 = 5 cm. The famous expression h2/h1 = -l2/l1 = -5 is directly visible from the two opposite similar triangles. The "device" (the lever and me:-) is a "mechanical inverting amplifier" with a "virtual fulcrum".

19th century
My guess is that millennia after Archimedes made a "mechanical inverting amplifier", at the dawn of electricity in the 19th century, perhaps Ohm, Thevenin, Norton, or most likely Wheatstone made an "electrical inverting amplifier". If they were able to do it then without the perfect measuring devices we have today, then we should be able to do it too. Okay, let's get to work.
Constant DC input voltage: You will control the input voltage source V1 and I will control the output voltage source V2. We will compare their voltages by opposing them through two resistors (R1 and R2) and read the result using a sensitive Vout voltmeter. My job is to adjust V2 by looking at the voltmeter to maintain the virtual zero. For example, the schematic below shows the case when you applied -1 V input voltage and I balanced it with 5 V output voltage. By the way, in this "game" I act according to the negative feedback principle. Very interesting - it turns out that back in the 19th century they made devices with negative feedback...

simulate this circuit – Schematic created using CircuitLab
Varying DC input voltage: We can simulate how you change V1 from -2 V to 2 V while, at the same time, I am forced to change Vout from 10 V to -10 V to maintain the Vout virtual zero. However, we need to replace the DC voltage sources with slightly more complex programmable CSW voltage sources, and run the Time-Domain Simulation.

simulate this circuit
Just to note that this arrangement only mimics the real "negative feedback game" to get the graphs below, but there is no feedback here.

21st century
Constant DC input voltage: So what new have we done today to get the real circuit of an inverting amplifier? Resistors R1 and R2 are the same as they were two centuries ago, we just added an op-amp; there is no need of voltmeter. The op-amp now "watches" the midpoint between the two resistors and varies its output voltage to keep it (near) 0 V.

simulate this circuit
Varying DC input voltage: As you can see, the graphical results obtained with DC Sweep Simulation are the same as above.

AC input voltage: Let's finally make the OP happy with their favorite AC-driven circuit.

simulate this circuit

Summary
Finally, let's simply repeat what we did in this inverting amplifier to get Vout = -5Vin:
By means of two resistors with a resistance ratio of R2/R1 = 5, we made two sources "fight" to change the midpoint voltage.
The midpoint voltage remains 0 V (virtual ground) and the voltages of the two sources are in the same ratio Vout/Vin = -R2/R1 = -5.
Zero voltage of the virtual ground means that everything is fine (the op-amp is successfully performing its duties, it is not saturated).
At the same time, the op-amp has a gigantic gain of the order of hundreds of thousands of times.
That is, the simple passive circuit of two resistors forced the op-amp to gain only 5 times (the ratio of the resistances).
Exactly the same way as above (in the 19th century:-), the same resistor circuit forced me to keep V2 5 times higher than V1.
Likewise, you can make another device (e.g. an Arduino) do this simple job and the result will be the same. This is because they are all based on the same general idea. You have understood this idea and therefore you have understood all these devices. That is the power of ideas...