The LET function was introduced in 2020 and allows you to write functions with variables.
https://support.microsoft.com/en-us/office/let-function-34842dd8-b92b-4d3f-b325-b8b8f9908999
Same result as in the question: =LET(x,A1/B1,IF(ISERROR(x),"",x))