Why did my tenderloin end up undercooked inside?
I am going to guess that your 4 oz tenderloin was probably about an inch thick.  Not moving that, in a hot pan, for only a minute and a half left it under cooked in the center and over cooked on the outside. The pan was too hot and the cook time was too short. Given your limited experience cooking tenderloin, I would suggest a couple of adjustments.  First, get a thermometer to accurately measure the temperature of your steak.  Identify the doneness you prefer and look up the associated temperature. If you are cooking in a pan, on the stove top, then turn the heat down to medium at the most...add some fat to pan.  Cook your steak, flipping every 30 seconds for about 5 minutes.  Check the temperature.  Continue flipping regularly until you are 5 - 10 degrees below your target temperature.  Remove from the heat, tent with foil, and allow to rest 5 - 10 minutes (carry over heat should get you the rest of the way to your target).  With experience, you will gain a feel for the doneness and can eliminate the thermometer.  Time is not an accurate measure, as there are too many intervening variables.  So, get a feel for temperature instead; not only measured temperature, but actually touch the cooked meat to see what it feels like.  Over time, with experience, this can guide you quite well.