Sometimes I embed music playing links onto my website. The workflow is as follows:

Create assets/css/extended/custom.css and paste:

/* Apple Music Embed */
.music-embed {
  max-width: 660px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.music-embed iframe {
  display: block;
  width: 100%;
  border: none;
}

/* Alignment */
.music-embed.left {
  margin-right: auto;
}

.music-embed.center {
  margin-left: auto;
  margin-right: auto;
}

.music-embed.right {
  margin-left: auto;
}

/* Width modifiers */
.music-embed.small {
  max-width: 400px;
}

.music-embed.full {
  max-width: 100%;
}

I am ok with directly writing html code in markdown files (if you prefer another layer of abstraction, you can create an .html file in layouts so that embedding is more straightforward)

Template:

<div class="music-embed center">
  <iframe
    src="https://embed.music.apple.com/us/album/YOUR-ALBUM-ID"
    height="450"
    allow="autoplay *; encrypted-media *"
    allowfullscreen>
  </iframe>
</div>

Configuration Options

Alignment and size is configured when setting CSS class As seen in the line

<div class="music-embed center small">

Options includes: for alignment:

ClassResult
leftLeft-aligned
centerCentered
rightRight-aligned

For size:

ClassResult
(none)660px max
small400px max
full100% width

Height, on the other hand, can be set in iframe attributes

ValueUse case
175Single song
450Full album (default)
500+Long playlists