How to create new pages using imported file in WordPress?

How to create new pages using imported file in WordPress as I like to use automatic method based on layout.

Your request is very vague. What sort of file are you proposing to import?

WordPress has two options:

  1. Posts
  2. Pages

Posts inside WordPress can be done:
To import WordPress posts along with their images, go to All Import › New Import and upload your import file. Choose Posts from the dropdown list, then set up your import process, including the images you want to import.

Execute the import and then review the imported posts and their images.

Source: https://www.wpallimport.com/documentation/how-to-import-wordpress-posts-with-images/

So, how to manage also Pages (it is not a post).

Use the built-in import capability or a plugin like Import any XML or CSV File to WordPress to build new pages and maintain the layout automatically. Prepare your content in XML or CSV for layout. From the WordPress dashboard, select Tools > Import and select your file type. Import your file and generate layout-based pages using the prompts.

Drag-and-drop page builder plugins like Elementor or Beaver Builder allow you to create bespoke layouts effortlessly. You can import and alter templates or blocks to fit your layout with these tools. These solutions let you quickly construct new pages with imported files while retaining website style and structure.