You can use the DescribeStateMachine API to get the all the information about the state machine, including the definition and then use the CreateStateMachine to create a new one in the other account.
Hopefully you have used some Infrastructure as Code tool such as Cloudformation, SAM or CDK to create your Step Functions code. In that case you should be able to run the same IaC code by just modifying the parameters in another account.
If you have created manually on the AWS console, you can try copying the generated Amazon States Language (ASL) JSON code and create a new Step Function in the new account and paste the copied ASL after modifying relevant parameters. However, with this approach, the other resources such as Lambda functions, SQS queues, SNS topics etc. etc. that are being referred to by the Step Functions need to exist in the new account.
Migrating AWS ses email identities from one aws account to another aws accountasked 2 months ago
Instructions to add another AWS account/user to my AWS accountasked 17 days ago
Transferring WorkMail to another AWS Accountasked 4 years ago
Is it possible move/migrate EIP to another account?Accepted Answerasked a month ago
Migrate AWS ccount with dedicated AWS Direct Connect connections to another AWS OrganizationAccepted Answerasked 2 years ago
How to migrate step machine to another accountasked a month ago
moving a SES identity from one account to another accountAccepted Answerasked 3 months ago
Is it possible to migrate a Pinpoint Phone Number into another account?asked a day ago
Is there a way to migrate directory services from Simple AD to AWS Managed Microsoft AD?asked 8 days ago
How to move emails from one AWS WorkMail user account to anotherasked 3 days ago