Never if possible loan players from a side in the same competition you are competing with.
It makes them immediately unavailable for two fixtures.
It disrupts a team if a replacement has to be found for these fixtures.
It strengthens a side who you are financially trying to compete with.
The exceptions are when you are trying to dodge PSR like the Raya loan for Arsenal, then buy the next year, if it is a position you really need to strengthen immediately and will serve you over a great length of time.