Try testing the keyboard outside Windows:
- Shut down the Surface completely.
- Press and hold the Volume Up button.
- While holding it, press and release the Power button.
- Continue holding Volume Up until the UEFI screen appears.
- If the keyboard is usable in UEFI, test the arrow keys and other available input fields.
If the keyboard also misses inputs in UEFI, that strongly suggests a hardware fault rather than a Windows problem.
Microsoft also provides a dedicated keyboard test through it Surface Repair Tool (SRT)
Because this is a new laptop, request a warranty replacement or service assessment from Microsoft. Intermittent keyboard failures on a new machine should not be accepted as normal behaviour.