To create a record on button click and go to edit form of newly created record you can use OOB steps Shown below:
Step 1) Consider we have contact list present on portal page.
Add two basic forms, Mode of one form should be insert type and other should be edit type.
Consider we have a list,
So navigate to List as shown below screenshot -> Select your list and under General tab scroll down to Create Button Label add label to the button -> And Select Web Page for Create to open a web page which will redirect to insert form.

Step 2) On Insert Basic form move to On Success Settings tab ->
After that go to Contact Entity Form and add below configurations in On Success Settings
Configurations:
- On Success: Redirect
- or Web Page: Contact Edit Web Page(Select your own web page)
- Append Attribute Value to Query String Parameter Name: id
- Append Attribute Value to Query String Attribute Logical Name: contactid.

Step 3) Clear you portal cache and view the result.
Click on Create button it will redirect to contact insert form



After adding details, click on submit button which will redirect to edit form.

- You can also achieve this using Web API operations, you can refer the mentioned below blog to achieve the same functionality.
Blog for reference : https://www.inogic.com/blog/2021/03/execute-different-web-api-operations-using-powerapps-portals-preview/
Hope this helps.
Thanks!
Inogic Professional Services
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at crm@inogic.com
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/