I'm designing a banking application which is capable of money transfer and showing transactions of each account to the user. Is it a bad practice to have a two line title in the header? The main title is Transactions(the current view) and the secondary title is the account number of the account the user is viewing.
It is a good question and I think it doesn't have a clear answer. If I understand correctly the context, the title of the page is "Transactions". The account number is actually the parent of this page.
Although you are not asking for Material design specifically I suggest you take a look to Structure app bar. In the bottom of the page there are some examples that make the Top bar double height so they can use the lower part as breadcrumb. I believe this might be a useful way of showing the hierarchy in your case.
The approach you have right now is clear, but using a double line in a short toolbar makes the line height too small and thus the text a bit cluttered.
Have you considered if revealing the full account number is really necessary at this point? If it's a banking application -- there are some sensitivities that you need to consider, especially displaying it boldly as a header. I believe the standard practice is that the number is hidden until requested to be shown. I would too consider using partial acct # or another proxy and in this way, you dont have to include the account # in the header at all.