Data speeds are slower on another phone
If data speeds are slower on another phone, it may be for any of these reasons:
That the slower phone is connected to a slow VPN or proxy, and the faster phone is not
Data that is sent or received has to go through the VPN or proxy, so if the VPN or proxy is slow, internet speeds are then slow.
That DNS over HTTPS or DNS over TLS/Private DNS settings are misconfigured
This can slow down or prevent the initial connection process (to a website, etc), but the speeds once connected will stay unaffected.
That the slower phone is on some other carrier
If one phone is on another carrier (mobile network operator), each carrier has their own frequencies they are licensed to use, may have their own towers, and may have their own parts of a tower.
That the data plan may limit the speed
If each phone has a separate SIM (for the same carrier), the phone with slower data may have a SIM may causes the phone to log in to an account that has a data plan that limits the speed, unconditionally or because a limit is exceeded.
That the slower phone is connected to some other radio access technology
Look at the icon in the status bar (G, E, 3G, H, H+, 4G, LTE, 4G+, LTE+, 4.5G, 5Ge, 5G, 5G+, 5G UC, etc), for example, if one phone is connected to 5G, and another is connected to 4G, the speeds can differ. This changes based on the settings of the phone, and settings loaded from the tower.
If both are Samsung phones, and one displays 4G while the other displays LTE, though these are equal, one of the phones might not be intended for use in your location (thus the different icon), and extended functionality may be unavailable.
That the slower phone is connected to something else
If both are Samsung phones (non-Verizon), access *#0011#, select the correct corresponding SIM slot if applicable, and take note of the Earfcn (may be displayed as DL Frequency instead) and the PCI.
If one or more is not a non-Verizon Samsung phone, use the third party app of your choice. Many phones on Android 7 or newer can share Earfcn information with apps, other phones gained the ability on Android 8.
Earfcns and PCIs may be set up in either way:


Earfcn and PCI changes are based on settings loaded from the tower. If a change is made, the phone might not be able to go back until conditions change substantially, this is to prevent phones going back and forth over and over again.
To attempt to have both phones connected to the same Earfcn and PCI, move the slower phone around, cause the slower phone to connect or be disconnected due to inactivity, etc.
Outside 4G, there is the NR_ARFCN (may be displayed as NARFCN, NR_EARFCN, NR-ARFCN, or ARFCN) and PCI, and there is the uarfcn (may be displayed as RX) and PSC.
For example, there may be analogues to 5GHz Wi-Fi and 2.4GHz Wi-Fi. There are many reasons why 5GHz Wi-Fi is preferred, even though the signal strength of 2.4GHz Wi-Fi may be better. If the signal strength of the analogue to 5GHz Wi-Fi dips below a threshold, the phone is to automatically switch to the analogue to 2.4GHz Wi-Fi. The signal strength is then improved. The phone should then not go back until the signal strength of the analogue to 5GHz Wi-Fi improves substantially.
Note, if cellular is restarted, the previously used cell may have been cached.
The settings loaded from the tower, including thresholds, are from System Information, while disconnected (such as due to inactivity), or a RRC Connection Reconfiguration, while connected. Thresholds might differ while connected.
If there are two SIMs for the same carrier, one in each phone, the access class may prevent use of the same Earfcn and PCI, but this is unlikely.
That one phone is not intended for use in your location
If one phone is not intended for use in your location, extended functionality may be fewer, and supported frequencies may be fewer.
That the hardware differs
This applies even if the modems in both phones are the same. The modem sends, receives, and processes coordinates, other components do the rest.