We have license for Solarwinds in On-prem .We are going to migrate to cloud , can we use same license or separate needs to purchase.
You can deactivate the license from your on-prem instance and use the same license on the new instance you deploy in the cloud.
If you're migrating the instance rather than starting a new instance, you can follow the instructions here (includes steps for the licenses):
documentation.solarwinds.com/.../migrate_solarwinds_to_a_new_server_with_a_new_ip_and_hostname.htm
documentation.solarwinds.com/.../orion_platform_migration_guide.htm