We learned how to write a Boolean formula of a function from its truth table. What happens if the function isn’t single bit? Do we just apply the same method but to each bit of the function seperately?

Yes. The brute force solution is to repeat the process for every output bit.

Is there a better solution? If so, what is it?

This is not an interesting question from an algorithmic point of view.

Why?

Consider a function f:\{0,1\}^n \rightarrow \{0,1\}.

(you can also consider a range that is more than one bit, the situation does not become easier, as you will see shortly).

The length of the truth table is 2^n (all possible inputs).

This means that even for n=100, there is no way you can store, print, or list the table.

Hence, your question is about small values of n. In such a case, one could write a book that lists all the functions, and for each function suggests the best formula/circuit.

By the way, this is the reason that I do not teach Karnaugh Maps. I do not understand why others bother to teach it - it only distracts and misleads students into thinking that “there is a way to optimize the formula or circuit for a given function”.