You can easily take the train back-and-forth over the Øresund between Copenhagen and Malmö. Either buy the tickets online, or you can download the Skånetrafiken app to purchase your tickets.
Round trip tickets cost about 25 USD. If you're travelling with someone else, make sure you purchase all group tickets on the same device to receive a discount.