If the universe is infinite, how can it be expanding? And how do we even know that it’s expanding?

Cosmologists do not claim that the universe is both infinite and expanding.

Most current theories posit a large finite universe.

Expansion is based on measurements that correspond to theoretical predictions. Things like the background radiation of the universe and the spectral shift indicate objects are moving apart.