Summarize this article:

Since the iTunes app is no longer a part of macOS as of the release of Catalina, Mac users will find Apple Music on the Launchpad and in the Applications folder. If you're using Windows or an older version of macOS, iTunes should be on the Dock (Mac) or in the Start menu (Windows). Use the USB cable that came with your phone or tablet or one that is compatible. Once your iPhone or iPad is detected, a button that looks like a smartphone will appear near the top-left corner of the app. This is called the "device icon."  iPhones and iPads can only be synced to one computer at a time. If you've already synced this phone or tablet to a different computer, you'll be prompted to erase its contents. To erase the contents and sync the phone or tablet with this computer, click Erase and Sync when prompted. It's the button that looks like a smartphone at the top-left corner of the app. If you don't see this button, make sure your iPhone or iPad's screen is unlocked. If there's a message on the phone or tablet asking you to trust the computer, follow the on-screen instructions to do so. Your syncing options appear in the left panel under "Settings." You'll need to adjust each media type's settings (e.g., Music, Podcasts, etc.) separately. For example, if you selected Music, check the box next to "Sync Music" at the top of the right panel, then choose which music to sync.  To sync music, click Music in the left panel, then check the box next to "Sync Music" at the top of the right panel. You can choose to sync all of the songs on your computer by selecting 'Entire Music Library or just specific music by selecting Selected playlists, artists, albums, and genres. Use the checkboxes in the bottom section of the page to select artists, songs, genres, etc. Select Movies, TV Shows, or Photos in the left panel to sync any of those types of media. Once selected, just check the box at the top for "Sync <media type>" and choose your preferences. It's at the bottom-right corner of the app. This should begin syncing the selected content to your phone or tablet immediately. If the sync does not begin, click Sync right beside it.

Summary:
Open Apple Music (macOS Catalina and later) or iTunes (Windows and pre-Catalina macOS). Connect your iPhone or iPad to the computer. Click the device icon. Click the type of media you want to sync. Select the content you want to sync. Click Apply.