Googlle "Record and playback mouse actions".
Example:
https://www.raymond.cc/blog/make-your-computer-automatically-perform-tasks-for-you/
Many choices available.
Just be careful of what software you download and where you download it from.
Lots of sites out there that may try to trick you into downloading something else.
And of course, look out for viruses, crapware, and other nasties that might be included.
Test one candidate program at a time in a test environment. Watch and read all presented windows very closely. Do not allow yourself to "click through" the download or installation process.
Cancel any downloads or installs that seem to be going "astray".