One way to add custom fields to post, pages and custom post typos, is Advanced Custom Fields, and with more than a million installs and premium tier, its most likely always working fine in with the latest WordPress versions.

Demo
The following text is fetched from two custom fields:
Here’s a quote: 🎨 This text was entered in a ACF Text Field, and the color below is a radio button. Lorem ipsum dolor sit amet, consectetur adipiscing July 2023
Citation: Green
Extract from WordPress.org
Use the Advanced Custom Fields plugin to take full control of your WordPress edit screens & custom field data. Our field builder allows you to quickly and easily add fields to WP edit screens … Load and display your custom field values in any theme template file with our hassle free developer friendly functions!
https://wordpress.org/plugins/advanced-custom-fields/