My immediate reaction is 'you don't'. The algorithms for discrete Fourier Transform are intensely complicated (they were only discovered in the 1960s). To get such a function into Excel 2019 requires a code module, typically as an add-in.
Since the formula language in 365 is Turing complete, it is now possible to write the DFT as a function/formula.
The video I used to help me implement the Cooley-Tukey Decimation in Time might suggest that the task is not to be undertaken lightly!