They have CSS styling targeting those infoboxes, specifically here: https://cookierunkingdom.fandom.com/wiki/MediaWiki:Common.css#L-749
Fortunately, this declaration is pretty portable, and you can copy it to your wiki (alongside a simple credit) with ease:
/* https://cookierunkingdom.fandom.com/wiki/MediaWiki:Common.css */
.page-content .portable-infobox .pi-title {
background-color:#604f41;
background-image:url(https://static.wikia.nocookie.net/cookierunkingdom/images/d/dd/Header_bg_604F41.png/revision/latest?cb=20230122050010);
background-position-x: 900px;
background-position-y: 330px;
background-size: 2400px 502px;
text-shadow:1px 1px 0 var(--theme-dark-accent),-1px 1px 0 var(--theme-dark-accent),1px -1px 0 var(--theme-dark-accent),-1px -1px 0 var(--theme-dark-accent),0px 1px 0 var(--theme-dark-accent),0px -1px 0 var(--theme-dark-accent),-1px 0px 0 var(--theme-dark-accent),1px 0px 0 var(--theme-dark-accent),1px 1px 0 var(--theme-dark-accent),-1px 1px 0 var(--theme-dark-accent),1px -1px 0 var(--theme-dark-accent),-1px -1px 0 var(--theme-dark-accent),0px 1px 0 var(--theme-dark-accent),0px -1px 0 var(--theme-dark-accent),-1px 0px 0 var(--theme-dark-accent),1px 0px 0 var(--theme-dark-accent),1px 1px 0 var(--theme-dark-accent),-1px 1px 0 var(--theme-dark-accent),1px -1px 0 var(--theme-dark-accent),-1px -1px 0 var(--theme-dark-accent),1px 1px 0 var(--theme-dark-accent),-1px 1px 0 var(--theme-dark-accent),1px -1px 0 var(--theme-dark-accent),-1px -1px 0 var(--theme-dark-accent);
border-bottom: 1px solid var(--theme-dark-accent);
}
You can change the background-image and background-color properties as you'd like