Dynamic or Fixed height for Modal window

Need your help to clarify one query related to the modal. My question is whether the modal height should be dynamic or fixed? Dynamic I refer to is that the modal height varies based on the amount of content & fixed modal will always have a fixed height regardless of the amount of content. For fixed modal, there will be an internal scrollbar to scroll the content. Sample images attached (first image represent the dynamic & the other 2 fixed). Which approach is the correct one as per the UX principles & widely used one? Thanks in advance!

enter image description here
enter image description here
enter image description here
enter image description here