Adding an expandable section to your Confluence page is straightforward, whether you are using Confluence Cloud or Data Center.
Based on your request, it seems you are looking for how to create (often called a "spoiler" or "collapse" macro) in Confluence. confluence ui expand
Enter the text that will act as the clickable link (e.g., "Click here for technical specs"). Adding an expandable section to your Confluence page