2 boxes that fit together

How make any graphics or artwork fit size of entire screen

There are like 2 square boxes on the screen
How make one of the square box fit exactly onto the other square box ? (box A and box B, box A was already there at start, i made box B)

Text or text input or any other graphics or artwork, do they all work the same and consistently for this

Do you have to add actions (“behaviors” things) to the graphics and artworks to make them do that. Graphics and artworks can do things (actions)
Or is do you have to use event codes to do that
Is there a button or link to click to make it fit automatically and by itself