I was just trying to replace my build’s blocks to terracotta block but then it showed unexpected at >>terracotta<< even terracotta block name doesn't exist . In simpler terms I was not able to replace blocks to terracotta because terracotta block doesn't exist in commands . I don't know why but I can't attach screenshots.
Terracotta is called hardened_clay in commands.