Since you only have a single table; I would advise the following steps:
1. Build a 2nd table (there will only be 1 record in this table).
2. Build a relationship between table 2 and table 1
3. Build a summary field that pulls up the Minimum [Record ID#] from Table 1 where [Field is empty] is Null/is empty. Call this [Min Empty Record ID#]
4. Add [Min Empty Record ID#] as a LOOKUP field in the relationship
5. Change the [Related Reference Field] from a numeric-reference field to a formula-numeric field with the formula value of 1
You MUST create your summary field BEFORE you change the related-reference field value to a formula; otherwise Quick Base will not let you build the summary field.
You can now see that the [Min Empty Record ID#] as a Lookup Value can be used in a button. I would recommend only making your [Update Next Available Record] button visible in VIEW mode; because your records that are being populated must be saved before the Min-Record ID# updates and can be used in a button.
Here's the App I built to test this.
https://laurahillier.quickbase.com/db/bnp4n3qqi (open to everyone)