how to run script file generated in sql sever 2014 in Sql Server 2017 or 2019?

I’m using SQL Server 2014 and I have database in it. I generate script file but when I try to execute in SQL Server 2019 it cant executed. How I can execute older version script file of SQL server in newer version?