There are special links called action links in Drupal. These appear at the top of the page and are generally used for links that allow the creation of an item by creating a links.action.yml file.
In your mymodule.links.action.yml, each action link defines the route it will link to, titles, and the routes it appears on:
message_type_add:
route_name: entity.message_type.add_form
title: 'Add message type'
appears_on:
- entity.message_type.collection
The appears_on key accepts multiple values that will allow this route link to appear on multiple pages:
