Short answer use overflow: scroll; or overflow: auto;
Relative parent need to have height, you set to 100px, but text height is much longer so it overflow.
Solution with 100% or auto on container wont work because it need to be some fixed value, not sure why.
In first code I set parent to 100vh - height of device, and set overflow to scroll, it will allow user to scroll content. This wont look nice on pc, because parent will take full height of screen, so some responsive style need to be done.
By default some browser also add scroll bar.
You can also use height with pixels, like 300px, 500px... with fixed values.
For spacing I suggest you to use padding.
In second code I set 100% height to child, so it will be inside parent, but text have more height so it overflow, you can add and remove overflow style to see how it works. Child have red border.