Many students find that they need letters of recommendation when they apply for a career position or graduate school. You should keep this in mind as you progress through your academic career and choose campus related activities. Simply taking a course with a faculty member does not give the faculty member much to write about as they have limited knowledge of your capabilities and approach.
There are many opportunities to participate in meaning campus and community activities, such as outreach, research labs, honor societies, clubs, college sports, etc. Your participation in these activities will help you to develop skills that will be useful in your careers and gain experiences with your fellow students and campus faculty. A faculty member who gets to know you through your participation in these activities, or is aware of your participation in these activities, is able to write a more complex and complete letter of recommendation.
If you do decide to request a letter, remember that it is a request and faculty can choose to provide or not provide a letter. Also, faculty members have different requirements related to the request so ask what they are. Here are some items that many faculty wish you to provide along with your request: