How did I fix «magento/module-elasticsearch-8[100.4.0, 100.4.1] cannot be installed as that would require removing magento/magento2ce[dev-2.4-develop]. They all replace magento/module-elasticsearch-7 and thus cannot coexist»?

2024-08-08--21-51-39

How do I adjust Magento ≥ 2.4.6 to Elasticsearch 8?