Short answer: You need to buy a bigger computer!
Long answer: Calculating the phonons requires diagonalising the dynamical matrix which has dimensions of (3N)^2 where N is the number of atoms. For 50,000 atoms this means a gamma point only calculation (where the dynamical matrix is real) would require a computer with just short of 0.2 TB of memory. If you were trying phonon dispersion where the matrix is complex then double this & computing eigenvectors would increase even further. To allow for all possibilities you should find a computer with about 1 TB of memory. So if you tried running this on your laptop then you can understand why you ran of memory!
General: Beyond the memory issue, you should also remember that diagonalising a matrix scales as the third power of the system size & so this is a very expensive calculation, which is why you don’t find people computing the phonons for 50,000 atoms in the literature as a rule. If your system is a supercell then the smarter approach is to run the calculation for the smallest possible cell and then integrate across the Brillouin zone. This provides the same (and arguably more) information and costs dramatically less if the unit cell is small.
Good luck buying that supercomputer.