I normally write all sizes, splitter positions etc at program end to an ini file and read it back when the application starts the next time. But there are also automatic components for that purpose: TXMLPropStorage, TIniPropStorage, TJsonPropStorage. For XMLPropStorage there is a wiki article (https://wiki.freepascal.org/TXMLPropStorage), but I think it can be extended logically to IniPropStorage and JsonPropStorage.
Do you also use TXMLPropStorage (or TIniPropStorage)?
I don't use them myself, but for not a good reason, just being used to writing code.
How to use them? Just follow the steps written under "Usage" in the wiki article. The attached demo only has an XMLPropStorage component on the form, and in the SessionProperties I defined the Width, Height, Left and Top properties to be stored. So, compile and run the demo. Change position and size of the window. When you close the program the XMLPropStorage creates an xml file with these settings (by default in the program folder, but you can change it by the FileName property of the XMLPropStorage). When you start the application the next time, the settings are read from the xml file and reapplied and the program will appear in the size and at the position where you left it. All this is done without a single line of code!
I would not store the position of every button and every other control. You should use the anchor editor (
https://wiki.freepascal.org/Anchor_Sides) to align the sides of the controls to each other, e.g. anchor the left side of a TEdit to the right side of a label to avoid the label text running into the edit. The anchor editor is a bit unusual to use at first time, but an absolute necessity for self-adjusting layouts
I cannot give more specific advice because I don't know what your application looks like. maybe you can post a screenshot here.