The only way I have found is to migrate restore it to a same version of the server and then generate scripts to complete the restore. This can be done via powershell library like dbatools or SSMS using a process like: https://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/