Which is better for web testing? Record-Play automation or coding?

Can anyone please clear my confusion on which web testing is better, whether record-play ro automation