How to custom Math fomula input as Google sheet?

There is an autocomplete component available in Anvil Extras

It might be able to help you with the UI