Hi @bbsin,
What is the items property of your gallery?
Normally, if you want to get the latest created record, you can try following formula:
Set(record1, Last(datasource))
If you want to get the latest modified record, and your DataSource is a SharePoint list, you can try this:
Set(record1, First(SortByColumns(listname,"Modified",Descending)))
Then you can update this record by using formula like this:
Patch(datasource,record1,{Name:XX....})
However, If you want to get the latest modified record, but your DataSource doesn't has a auto generated Modified column, you should add this column manually. Then you can get the latest modified record by modified property.
Best regards,
Allen