You can use this Mapbox
article to understand how you can change markers regarding zoom level.
If you will provide description how exactly do you want dynamically change icon we can find the solution for you.
For example in my apps I need to display different icon regarding attribute value for the feature
...
feature.attributes = [
"pin_icon": pinType.selectedPinType.rawValue //icon_key_name
]
...
...
let layer = MGLSymbolStyleLayer(identifier: "markers", source: source)
layer.iconImageName = NSExpression(forKeyPath: "pin_icon")
...