You can use the Auto-Layout functions in Figma which can help you achieving better responsive results.
Here is a list of all available possibilities:
https://www.figma.com/design/BfXxTbxcc7vrjDvxNfR5p9/Auto-layout-playground?node-id=2411-1174&t=RixZ2wI7ilxOVux2-1