Hi,
It's actually quite simple.
At least it's so simple that even I managed it.

It wasn't served to me on a plate, so a little work is required. After all, it gives you expensive options for free.
I think it's worth making a little effort for that.
Here are a few basic instructions, the rest you can then look up yourself.
Use the appropriate script for the respective product group (Scope, Generator).
- In this script, replace the placeholder for the serial number with the actual serial number.
- If a scope is the candidate, also add the scope ID
- The model is entered according to the device. Please note that only the model group is meant, e.g. if you have an SDG6022X, it is sufficient to enter SDG6000X as the model.
- Copy the modified script into a Python Online Compiler and start the compiler.
- The corresponding license keys will then be issued, which you should save.
- To verify that the keys fit, you can do a simple test.
- You establish a Telnet connection with the device and then use the MCBD? command to query its current bandwidth.
- If you then find this key in the previously generated keys, the other generated keys are also correct.
- At least the bandwidth can be increased via the currently active telnet connection, using MCBD plus the desired (bandwidth) key.
- Other options are entered directly on the device.
This description is not complete, but it should suffice as a pointer.

It seems it do not work for SDS2000X HD and SDS3000X HD
Correct.
The known scripts do not work on these models, nor on newer SDS5000X.
And no,
I don't know how to do it differently.
I just know that it's not that easy, nothing more.