Back to the original topic, the two-step action that can be recorded to automate the Layer > New > Layer via Cut and then selecting the relative backwards/previous layer:

OPT/ALT [
Is the relative keyboard shortcut to select the previous/background layer (left square bracket), as one does not wish to record an absolute or explicit layer name into the action.
This action can have a function keyboard shortcut applied in the action panel. Or you can reference the action in a script, which gives one more flexibility in selecting a keyboard shortcut.
https://prepression.blogspot.com/2016/11/photoshop-scripting-actions.html
While purely scripted solution could be written as follows:
cutToLayer();
function cutToLayer() {
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
executeAction(s2t("cutToLayer"), undefined, DialogModes.NO);
}
select(false);
function select(makeVisible) {
var c2t = function (s) {
return app.charIDToTypeID(s);
};
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
var list = new ActionList();
var reference = new ActionReference();
reference.putEnumerated(s2t("layer"), s2t("ordinal"), s2t("backwardEnum"));
descriptor.putReference(c2t("null"), reference);
descriptor.putBoolean(s2t("makeVisible"), makeVisible);
list.putInteger(8);
descriptor.putList(s2t("layerID"), list);
executeAction(s2t("select"), descriptor, DialogModes.NO);
}