We're glad to have you here in the Community, @imran_one.
Let's go to the Custom form styles and make some modifications to your invoice template. From there, you can edit your company details.
Before we proceed, may I know where you're trying to edit your company details? And did you get an error message when modifying it? Any additional information would be greatly appreciated.
Here's how:
Click the Gear icon, then select Custom form styles.
Select the invoice template you're using, then click Edit under the Action column.
Go to the Content tab and select the Header part of the template.
In the fields, edit your company details so it'll reflect on your invoices.