I'll be posting the modified code at the bottom, but explain first the changes that was made
First thing, is that I removed the "puts words" on line 8 and "print word" on line 10, since they were just printing out extra text.
The first one, "puts words" could have stayed, since it would print out everything and add a new line at the end, but the "print word" which happened for every word would interfere with the interpreter that would read the final result.
Secondly, you were comparing the wrong variable, using the full text version against the redacted word "if text == redact", instead of the individual word "if word == redact".
Thirdly, is that you needed to change 'print "REDACT"' with 'print "REDACTED "', since the example provided that text and the interpreter that checks if you failed or succeeded the challenge would be looking for that precise pattern in the result.
puts "Palavra a ser pesquisada:"
text = gets.chomp
puts "Palavra a ser editada:"
redact = gets.chomp
words = text.split(" ")
words.each do |word|
if word == redact
print "REDACTED "
print word + " "