I am trying to create a difference layer from an overlay layer and a base layer. The base layer (colored orange in the image below) has a larger extent than the overlay layer (light brown) when zoomed out, but I want it to have the same extent with the overlay layer:
I could manually create a new base layer by drawing a rectangle or square over the overlay layer, but I prefer the exact extent of the overlay layer.
How can I create a new layer containing a polygon that shows the extent of the overlay layer?

Create layer from extentfor QGIS 3.6 and ahead – Aman Bagrecha Jun 22 '22 at 09:19