A solid OSS contribution will take somewhere from 3-6 months. It involves getting accustomed to the project, reading and understanding their code base, finding interesting issues, fixing the code, making a PR and fixing the reviews until the maintainers are ready to merge.
Here are the steps I would recommend
Pick an open-source project that you already use every day. For example, in Python, the easiest way is to look at your requirements file
If you already know anything you can improve, raise an issue.
Go through the Github issues. Filter by label Good first issue
If there aren't any good first issues, Go through other issues and find the ones you are interested in
Read their contributor guidelines Contributing.md file
Fork and clone the repo follow the setup instructions
Make the fix, add test cases, and run linters, most codebases have a dev setup
Push the PR. follow the PR and commit guidelines
Incorporate the changes that reviewers give you. Maintainers are busy, so it's a good idea to find active reviewers and mention them in PR comments for review