apex get object fields by api name code example
Example: apex get object fields by api name
SObjectType objectType = Schema.getGlobalDescribe().get('<Object API Name>');
Map<String,Schema.SObjectField> fieldMap = objectType.getDescribe().fields.getMap();