Hi there
@Cece , welcome to endless boating forums.
One thought to consider checking would be the next time the engine is hot and/or acting up by not starting, 'When possibly convenient and safe for you, try to be ready to perform a quick engine cylinder compression test to see how the internal compression numbers are faring...If compression numbers are really low, than it could be an fair indication of why the engine may not want to start while hot.
Let us know what you find out, good luck.