Google’s John Mueller said on Twitter that errors in schema markup do not affect the search engine rankings of the web pages that contain that code. However, Google won’t be able to show rich results if the markup code is not valid.
No effect on rankings, but if the structured data isn't valid, we wouldn't be able to show it in search.— 🍌 John 🍌 (@JohnMu) September 17, 2019
How to create schema markup for your website
Schema markup code can help you to get listed with rich results listings on Google’s search result pages. Not all rich results increase the numbers of visitors that your website gets so you have to be careful. The Rich Results Creator tool in SEOprofiler helps you to create schema markup for your web pages: