Use the Scaled to Fit modifier to scale a layer to fit its parent while maintaining the layer’s aspect ratio as it scales.
For example, by applying the Scaled to Fit modifier to this Circle, the Circle fits the Frame while maintaining its original aspect ratio.