Thanks for reaching out to the Community, @zaid.alathwar.
To properly track and record the foreign transactions with different exchange rates, you'll need to turn on and use the multicurrency feature in QuickBooks Online (QBO).
Before doing so, please know that once you turn the multicurrency on, you can no longer turn off the feature again. Your home currency is set and cannot be changed.
Here's how to turn on the multicurrency feature:
Next is, follow the steps below on how to add the currencies you'll use:
Once done, you can now add different exchange rates when entering transactions. You can check these articles for your reference:
For future reference, you can also visit this article to learn how to record a loan payable in QBO: Record a loan and its payment.
This will get you on the right track! I'll be around to help if you have additional questions about entering transactions with different exchange rates. Have a good one!