Error when creating custom form
FormBase is abstract; it implements FormInterface, but doesn't contain methods for:

getFormId
buildForm
submitForm

You need to provide those in your class or PHP will reject it.
...
class Test extends FormBase {
  
  public function getFormId() {
    return 'foo';
  }

  public function buildForm(array $form, FormStateInterface $form_state) {
    // Build form then
    return $form;
  }

  public function submitForm(array $form, FormStateInterface $form_state) {
    // Perform submission tasks
  } 

}