I actually am having the odd problem this year of a few tomato plants that flowered and fruited while still small. Then the plant seems to put all its energy into producing a couple fruits but doesn’t itself grow much, if at all. One plant is literally 8” tall and is making a 3-1/2” tomato - slowly...
These were varieties such as “Celebrity” and “Better Boy”.
This isn’t really a problem as many other plants are doing well. But, I’ve never seen it to this degree.
That is a puzzle but here is a video that might help recover something from them.
How To Recover Stunted Tomato Plants
https://www.youtube.com/watch?v=6EnUsiRSI74
I assume they couldn’t be root bound (small hole in clay soil or whatever) and you already know about all the obvious, sunlight, watering, etc.
Here's the one I pulled the flowers off of.
The two outer ones here are the two I didn't pull flowers from and they each made three fruits but I've since pulled the fruit off of one to further experiment. Don't know if it will reboot or not.
The one I pulled flowers off of when I first got it is nearly twice as tall, a couple of shades darker green, grew two new main stems and has 6 fruits, 20 flowers and half a dozen buds. That's a potential 30 maters compared to 3.
I'll be removing flowers from any mater plant that seems too small to be producing from now on. Let the plant get some size and then let it go.