Glass is definitely the best material to ferment in. It is non-porous and won’t transfer by-products or flavors. It is also very easy to clean up and sanitize.
Plastic can be alright as well but because it is softer it can get scratched. These scratches can harbor unwanted bacteria that can affect the quality (and even safety) of your batch. Be very careful in how you clean and handle plastic. Avoid anything abrasive and avoid utensils as well.
Here are some links to fermenting jars I use: