Instead of using endless .replace() chains,  
- Create a substitutions library
 
- Join lib Keys into a 
query RegExp /(a|e|i|o|u)/ 
- Use 
.replace() once for fun and profit 
var input = document.querySelector("input");
var h1 = document.querySelector("h1");
var lib = {
  'a':'e',
  'e':'i',
  'i':'o',
  'o':'u',
  'u':'y',
};
input.addEventListener("input", function(e){
  var q = new RegExp("("+ Object.keys(lib).join('|') +")", "ig");
  h1.textContent = this.value.trim().replace(q, $1 => lib[$1]);
  
});
<input type="text">
<h1></h1>
 
 
How it works:
The String.prototype.replace() method offers a callback function, where inside it's arguments you can provide the aliases to the regexp matches () ← Match Group. We're interested in only the first-and-only group, used as $1.
Inside the callback we replace the matched character occurrence with the one from our substitutions  library.
To make it more understandable, here's the expanded version:
//...
input.addEventListener("input", function(e){
  var characterKeys = Object.keys(lib).join('|'); // "a|e|i|o|u"
  var matchGroup = "("+ characterKeys  +")";      // "(a|e|i|o|u)"
  var reg = new RegExp(matchGroup , "ig");
  // meaning: Match any of the characters present in the group
  // (the | is the options delimiter).
  // Finally: 
  var inputVal = this.value.trim();
  var replacedText = inputVal.replace( reg , function(match1) {
     return lib[ match1 ];
  });
  h1.textContent = replacedText;
});
What the return lib[ match1 ] does is simply:
If while regex-parsing the string, the "e" character is encountered, return it's library replacement, in this case lib[ "e" ] === "i" therefore the character "i" gets inserted at that callback point.
Also, get to know Object/keys