Yes, databases created in SQL Server 2017 can be used in SQL Server 2022. SQL Server 2022 (16.x) is designed to be backward compatible with earlier versions of SQL Server. However, it is recommended to test your applications and databases for compatibility before upgrading to a new version of SQL Server. As for any precautions, it is always a good practice to back up your databases before performing any upgrades or migrations.
References: