Ensemble learning : Ensure its better performance

Does ensemble learning always ensures better results than the ‘best’ model used among ensembles ( models used to do ensembling) ??

IF not ?? Then What are best practices to ensure optimal result from our ensemble model, in both regression as well as classification cases.

P.S : I am asking this, because I have found many of my ensembles performing poor than XGBoost, and sometimes even RandomForest.

P.P.S : I know RandomForest is itself an ensemble technique ( Is this the cause behind poor performance of new ensemble created using various models).