@Nirali Shah Thanks for reaching out.
Unfortunately, you cannot terminate the for loop action. Only using until loop you can terminate the loop. If you cannot use the until loop and want to still use the for loop then you should define a condition inside your for loop so your workflow condition inside doesn't executes further based on your condition/logic but the loop will still be executed till the end.
Alternative you can offload this functionality to azure function where you have control over the code as per your requirement.
Hope the above helps and let me know if you have any queries or concerns.
Please 'Accept Answer' if it helped so that it can help others in the community looking for help on similar topics.