Use Auto Layout, Absolute position and Constraints. You can see an example here: Figma Auto Layout Playground.