If you don't mind playing around with Python a bit - you could export the model to a Python script using the option Export as Script Algorithm... in the Processing Modeler window.
Then you could inject this piece of code and run the exported script.
Of course then you can easily implement your logic of passing the field name dynamically.
#INPUT - fields to remain
fieldsToRemain = ["id", "temp_id"]
#vlayer is a QgsVectorLayer object
fields = vlayer.fields()
print([f.name() for f in fields])
fieldsToDelete = []
for field in [f for f in fields if not f.name() in fieldsToRemain]:
idx = fields.indexFromName(field.name())
fieldsToDelete.append(idx)
vlayer.startEditing()
vlayer.deleteAttributes(fieldsToDelete)
vlayer.commitChanges()
#only the desired fields are left
print([f.name() for f in vlayer.fields()])