It’s possible to create custom forms for SharePoint lists/libraries using Power Apps, directly from the list command bar by using the option Integrate/Power Apps/Customize the form:

This allows you to create a custom form using all features that a Canvas app offers. While you can keep all the out-of-the-box SharePoint list view native features, such as sorting, filtering, grouping & using JSON formatting, you will be able to build an entire new form by using the Canvas apps studio.
Variables and form behaviour
It’s great to be able to customize the form only and quickly build more advanced forms by using Power Fx and Canvas apps features, however it’s important to bear in mind how variables work.
The event Screen.OnVisible, will run only by on the first time you open an item in a list/view, OR if you create multiple screens and navigate to it. This means that when you select another item in the view, the event Screen.OnVisible is not going to be triggered…
Source link
More About This Author

-
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
Array
Modern Workplace16 September 2023Call authenticated external APIs using JavaScript from Power Pages
Modern Workplace9 September 2023Using SharePoint list formatting and Power Automate to create linked items (via LookUp field) in a related list
Modern Workplace1 September 2023Using the HTTP with Azure AD connector in Power Automate to create Planner Plans and add them as Teams tabs
Modern Workplace26 August 2023Create an Issue Tracker App using Power Apps Copilot (Preview)